Effacer les filtres
Effacer les filtres

Neglecting certain values taken by the contour

9 vues (au cours des 30 derniers jours)
ANOSH PHIROZ AMARIA
ANOSH PHIROZ AMARIA le 17 Sep 2018
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);

Réponse acceptée

Star Strider
Star Strider le 17 Sep 2018
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

Plus de réponses (0)

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by