フィルターのクリア

How to assign corresponding lat , Lon to grid points

1 回表示 (過去 30 日間)
swetha S
swetha S 2019 年 6 月 24 日
コメント済み: Matt J 2019 年 6 月 24 日
I have a 3d data , RF(35*33*122) Lon,lat,time.
Now to convert this to corresponding grid points , I used reshape (35*33). Now the data is (1155*122). And removing the NaN columns final array size is (290*122).
122- time steps. 290- grid point.
Now I want to plot this for a particular time step how to assign the 290 grids it's corresponding lat and lon ?

採用された回答

Matt J
Matt J 2019 年 6 月 24 日
編集済み: Matt J 2019 年 6 月 24 日
You should just leave the grid data in its original form, without any of the NaN-removal or reshaping. None of the changes seem helpful or necessary if the goal is plotting. Note that plotting commands generally ignore NaNs.
And if you leave things in their original form, the correspondence between grid point data and their coordinates remains clear.
  2 件のコメント
swetha S
swetha S 2019 年 6 月 24 日
Actually for further calculation I have to remove NAN. The output data is of 290*290 dimension. ( How every grid point is related to everyother). In order to plot that I must assign corresponding lat,lon to the 290 grid points
Matt J
Matt J 2019 年 6 月 24 日
What I would do is compute
template=RF;
map=~isnan(template);
and now, every time you want to plot, just load the results back into the template, e.g.,
template(map)=computation;
surf(template(:,:,1))

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by