Can Anyone explain this code to me ??

[lon0,lat0]=meshgrid(65:0.05:80,68:-0.05:10);
%%%%====================================================
% pcolor(lon0,lat0,Rtarea21);
lon1=lon0(500:1:800,20:1:60); lat1=lat0(500:1:800,20:1:60);
R=Rtarea10(500:1:800,20:1:60);
K=Rtarea10(945:1:955,245:1:255);
K1=mean(K);
K2=mean(K,2);
TepR=mean(K1);
% TepT=Rtarea10(949,248)
TepT=Rtarea10(944,250);
contourf(lon1,lat1,R);

 採用された回答

Walter Roberson
Walter Roberson 2016 年 5 月 24 日

0 投票

The code creates a grid of data spaced every 0.05 apart from 65 to 80 and 68 to 10, and extracts part of it. It also extracts part of Rtarea10 matching the same locations. It uses the extracted grid as the x and y coordinates to do a contour plot on the extracted Rtarea10

3 件のコメント

Add
Add 2016 年 5 月 24 日
編集済み: Walter Roberson 2016 年 5 月 24 日
In the 1st line,
65:0.05:80 is it for lon0 and
68:-0.05:10 for the lat0 ??
Also ,
lon1=lon0(500:1:800,20:1:60); lat1=lat0(500:1:800,20:1:60);
what does this mean ??
Walter Roberson
Walter Roberson 2016 年 5 月 24 日
Yes for lon0 and lat0.
lon0(500:1:800,20:1:60) means to extract a rectangle from the array, and the rectangle should be rows 500 to 800 inclusive, columns 20 to 60 inclusive. That will correspond to the region with lon0 from 65.95 to 67.95, and lat0 from 43.05 to 28.05
Add
Add 2016 年 6 月 6 日
how do I know which row and column in lat0 and lon0 correspond to which region ??

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

その他の回答 (0 件)

質問済み:

Add
2016 年 5 月 24 日

コメント済み:

Add
2016 年 6 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by