Map Projection and Contour Plot
2 次查看(过去 30 天)
显示 更早的评论
When I plot a map created from MATLAB's Map Projection and overlay it over a contour plot, I get an error. Now it will work if I make my lat, long, and temp into an array, but my data from a input file is in column format like:
lat = 54
45
52;
Please help me in finding a way to plot it as column vectors or change the column vectors into an array without destroying the data.
Here is the code:
clc;
figure;
axesm('MapProjection', 'ortho', 'origin', [25,123])
framem;
load coast;
plotm(lat, long, 'k')
gridm
clear lat long;
lat = [50 45 52 45 46 34 32 56 78];
long = [123 132 123 120 122 119 129 135 132];
temp = [72 73 74 60 61 62 65 78 77];
contourm(lat, long, temp)
Thanks,
Amanda
0 个评论
采纳的回答
Walter Roberson
2012-8-21
See griddata() or the TriScatteredInterp class, to convert your scattered points into a grid of data suitable for contourm()
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Mapping Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!