フィルターのクリア

Neglecting certain values taken by the contour

9 ビュー (過去 30 日間)
ANOSH PHIROZ AMARIA
ANOSH PHIROZ AMARIA 2018 年 9 月 17 日
回答済み: Star Strider 2018 年 9 月 17 日
I have a contour plot M whose values are ranging from positive to negative. On my output plot,I only want to show the values greater than or equal to 0 value of M
Ro=0.00:0.005:0.3;
Ri=real(((Ro.^4)-(Ro./(1250*pi))).^(0.25));
[a,b]=meshgrid(Ro,Ri);
M=39250.*pi.*((a.*a)-(b.*b));
%Delta=0.00992./b;
[C,h]=contour(a,b,M,30);
clabel(C,h);

採用された回答

Star Strider
Star Strider 2018 年 9 月 17 日
I am not certain what you want to do, so I included two options for you to choose from:
Ro=0.00:0.005:0.3;
Ri=real(((Ro.^4)-(Ro./(1250*pi))).^(0.25));
[a,b]=meshgrid(Ro,Ri);
M=39250.*pi.*((a.*a)-(b.*b));
%Delta=0.00992./b;
[C,h]=contour(a,b,M,30);
Lvls = h.LevelList; % <— Add This Line
h.LevelList = Lvls(Lvls >= 0); % Only Plots Levels >= 0
clabel(C,h, Lvls(Lvls >= 0)); % Only Labels Levels >= 0

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by