Problem display when i.m plot height and direction wave in map

1 回表示 (過去 30 日間)
eko supriyadi
eko supriyadi 2017 年 8 月 9 日
コメント済み: eko supriyadi 2017 年 8 月 10 日
dear all,
i want plot height and direction wave sea in map.
when i run this script, i get error syntax..
the message error is:
Index exceeds matrix dimensions.
Error in test1 (line 22) contourf(lon,lat,SWH1(:,:,9)','LineStyle','none');
Can any one tell how to solve this problem
I attached too the data input (in netcdf):
here is my script:

回答 (1 件)

KSSV
KSSV 2017 年 8 月 9 日
編集済み: KSSV 2017 年 8 月 9 日
Replace line 22 with:
contourf(lon,lat,SWH1(:,:)','LineStyle','none');
Your lon, lat are matrices of size 25X25......your SWH1 is a 2D matrix of size 25X25.....you are expecting it to be 3D and trying to plot SWH1(:,:,9)...so the error...
  2 件のコメント
eko supriyadi
eko supriyadi 2017 年 8 月 9 日
ok thanks..
this my result (see image attached)..
when i'm replace number 9 from SWH1, the contour of wave is empty (display with white area).
and also how display wave direction with above script.. because i'm need these 2 parameter (height and direction wave) to display in one map.
i attach too the m_map toolbox to process this research from: www.eos.ubc.ca/%7Erich/m_map1.4.zip
thanks in advance
eko supriyadi
eko supriyadi 2017 年 8 月 10 日
anyone..any idea about these problem?

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by