Borrar filtros
Borrar filtros

Neglecting certain values taken by the contour

9 visualizaciones (últimos 30 días)
ANOSH PHIROZ AMARIA
ANOSH PHIROZ AMARIA el 17 de Sept. de 2018
Respondida: Star Strider el 17 de Sept. de 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);

Respuesta aceptada

Star Strider
Star Strider el 17 de Sept. de 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

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by