Map projection doesn't work in Matlab2015a?

2 ビュー (過去 30 日間)
Madan Kumar
Madan Kumar 2022 年 7 月 14 日
コメント済み: Madan Kumar 2022 年 7 月 15 日
Hi,
I have lat (37x73), lon(37x73) and a rainfall data(37x73). I plotted the rainfall data (attached) on map with robinson projection. However, it seems there is blanck space (I mean it is not covering the globe completely, see attched plot) although lat(-90 to 90), lon(0 to 360) and corresponding data show global coverage. I really don't know the reason. Am I doing something wrong?? Thank you so much.
my code is below
ann=importdata('rain.txt');
x1=0:5:360;%lon
y1=-90:5:90;%lat
x2=repmat(x1,37,1);
y2=repmat(y1',1,73);
%%if lon>180,west longitude
[ay,ny]=find(x2>180);x2(ay)=x2(ay)-360;
%%%%plot data on globe
landareas = shaperead('landareas.shp','UseGeoCoords',true);
axesm ('robinson', 'Frame', 'on', 'Grid', 'on');set(gca, 'color', 'none');
surfm(y2,x2,ann);geoshow(landareas,'FaceColor','none','EdgeColor',[1 1 1]);
  1 件のコメント
Madan Kumar
Madan Kumar 2022 年 7 月 15 日
Solved it. longitude -180 was zero (=360-360)when substracting from 360.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMap Display についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by