draw contour from given data
2 次查看(过去 30 天)
显示 更早的评论
i have attached one excel file which contains 3 column long,lat,data.I want to draw a contour plot
1 个评论
采纳的回答
Ameer Hamza
2020-4-11
编辑:Ameer Hamza
2020-4-11
Something like this
data = readmatrix('final.xlsx');
x = data(:,1);
y = data(:,2);
v = data(:,3);
[X,Y] = meshgrid(unique(x), unique(y));
V = reshape(v, size(X));
contour(X,Y,V);
Data values at a few points are messing up the colors of all the contour lines. You mat consider filtering values in matrix v in the above code.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/283771/image.png)
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!