Problem doing plots using contour with NaN elements in a matrix

5 ビュー (過去 30 日間)
Ricardo Duarte
Ricardo Duarte 2021 年 2 月 15 日
編集済み: dpb 2021 年 2 月 17 日
Dear all,
I have 3 matrices: lon, lat, depth.
Than I want to remove all the depth values that are bigger than 0. To do so I use:
depth(depth>1)=NaN.
By doing this I remove the land part, which is ok.
The problem then is that I want to create a contour arround the sea level, which means at the depth =0. To do so I'm doing:
[C,H]=contour(lon,lat,depth',[0 0]);
As a result I obtain an empty C matrix and I don't understand why!!!
Hope you can help me!
Thanks in advance.
  16 件のコメント
dpb
dpb 2021 年 2 月 16 日
A search uncovered a response from Bruno that pointed another user to <mesh2d-delaunay-based-unstructured-mesh-generation> on File Exchange
Ricardo Duarte
Ricardo Duarte 2021 年 2 月 16 日
Thank you!

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by