フィルターのクリア

surfacem: How to display nans in white color?

5 ビュー (過去 30 日間)
Iris Hinrichs
Iris Hinrichs 2013 年 5 月 14 日
Hi there,
under the following link, http://www.mathworks.com/matlabcentral/newsreader/view_thread/140607 it was suggested by Sergey to use
h=imagesc(X,Y,C) set(h,'alphadata',~isnan(C))
to make the nans appear in white color. This works perfectly fine for imagesc but I have to use surfacem and in this case, the nans don't display in white, unfortunately. Does anybody know how to solve this problem?
Thanks in advance, Iris

回答 (1 件)

Iris Hinrichs
Iris Hinrichs 2013 年 5 月 14 日
I found it out myself. The solution is
h = surfacem(C) set(h,'alphadatamapping', 'none','alphadata', double(~isnan(C)), 'FaceAlpha', 'texturemap')

カテゴリ

Help Center および File ExchangeImport, Export, and Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by