the question asks to subplot the contours any idea how?

5 visualizaciones (últimos 30 días)
dulanga
dulanga el 7 de Mzo. de 2017
Comentada: KSSV el 8 de Mzo. de 2017
x = linspace (-1,1); y = linspace (-1,1); [X, Y] = meshgrid(x,y); Z=7*sin(pi.*X).*cos(3*pi.*X);
surf(X,Y,Z ) hold on contour(X,Y,Z) hold off
rotate3d on
the question asks to subplot the contours any idea how?

Respuestas (1)

KSSV
KSSV el 7 de Mzo. de 2017
x = linspace (-1,1);
y = linspace (-1,1);
[X, Y] = meshgrid(x,y);
Z=7*sin(pi.*X).*cos(3*pi.*X);
subplot(211)
surf(X,Y,Z )
subplot(212)
contour(X,Y,Z)
rotate3d on
  2 comentarios
dulanga
dulanga el 7 de Mzo. de 2017
hi the second subplot just has a bunch of lines?
KSSV
KSSV el 8 de Mzo. de 2017
For your data the contour lines would be straight.

Iniciar sesión para comentar.

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