how could i plot a contour
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
khaled Abdelghafar
el 28 de Feb. de 2022
Comentada: Abolfazl Chaman Motlagh
el 28 de Feb. de 2022
Hi
i want to plot the following contour but i always encounter an error
x=-pi:0.001*pi:pi;
y=0:0.1*6:6;
[x,y]=meshgrid(x,y);
z=(100*sqrt(2*pi)/sqrt(2*pi.*(y-2.))).*cos(x/2).*(1.-sin(x/2.).*sin(3.*x/2.));
contour(x,y,z)
1 comentario
Abolfazl Chaman Motlagh
el 28 de Feb. de 2022
Respuesta aceptada
Arif Hoq
el 28 de Feb. de 2022
Editada: Arif Hoq
el 28 de Feb. de 2022
you shoud demontrate element wise multiplication/division in the variable z. most porbably this contour is allowed to plot real value.
x=-pi:0.001*pi:pi;
y=0:0.1*6:6;
[x,y]=meshgrid(x,y);
z=(100*sqrt(2*pi)./sqrt(2*pi.*(y-2))).*cos(x./2).*(1-sin(x./2).*sin(3*x./2));
% contour(x,y,z)
contour(real(z))
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Contour Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
