How to create my own landmask?
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, I would like to create my own landmask for my model. Until now, my script looks like this:
index_land=isnan(land); %if 1 then land
[x, y] = meshgrid(lon, lat);
land=x.*index_land'; %if 0 then ocean
land(land==0)=nan;%if 0 (=ocean) then nan
h=pcolor(x, y, land);%plot landmask
But my questions now consists in: How can I change my script to be able to use it like a function? I would like to use this pcolor-landmask-plot in several plots. Thank you for your suggestions!
2 件のコメント
Image Analyst
2017 年 9 月 25 日
What is land to begin with? Some kind of data with nans in it? What do you want land to be after you turn it into a mask? A logical image with true and false where there is or isn't land (which is the most typical and sensible way to have a mask)?
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Oceanography and Hydrology についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!