plotting the data on land only
이전 댓글 표시
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
답변 (1개)
Alan Stevens
2020년 8월 26일
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
Alan Stevens
2020년 8월 26일
Remove the view(0,90) command if you want a 3d view.
thomas gisiri
2020년 8월 26일
Alan Stevens
2020년 8월 26일
I guess you have to decide what elevations constitute land, then replace all other values by NaNs before plotting.
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!