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

2 Ansichten (letzte 30 Tage)
eko supriyadi
eko supriyadi am 9 Aug. 2017
Kommentiert: eko supriyadi am 10 Aug. 2017
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:

Antworten (1)

KSSV
KSSV am 9 Aug. 2017
Bearbeitet: KSSV am 9 Aug. 2017
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 Kommentare
eko supriyadi
eko supriyadi am 10 Aug. 2017
anyone..any idea about these problem?

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by