Hi everyone,
I have the following data of water height 'WH.xlsx' of the whole world, I want to plot only the data values which are on land. can anyone help me on how I can plot them. the data are in size of 0.5 latitude by 0.5 longitude.
thanks

Antworten (1)

Alan Stevens
Alan Stevens am 26 Aug. 2020

0 Stimmen

Replace the values less than zero by NaNs, then use the surf command. Something like the following perhaps:
ix = WH<0;
WH(ix) = NaN;
surf(WH), view(0,90)

3 Kommentare

Alan Stevens
Alan Stevens am 26 Aug. 2020
Remove the view(0,90) command if you want a 3d view.
thomas gisiri
thomas gisiri am 26 Aug. 2020
when I plot them some point are in ocean and other are missing in some part of land. still there some issues
thanks
Alan Stevens
Alan Stevens am 26 Aug. 2020
I guess you have to decide what elevations constitute land, then replace all other values by NaNs before plotting.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Line Plots finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 26 Aug. 2020

Kommentiert:

am 26 Aug. 2020

Community Treasure Hunt

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

Start Hunting!

Translated by