How to convert from surf to plot3 ?

5 visualizaciones (últimos 30 días)
Tin Truong Chanh
Tin Truong Chanh el 5 de Abr. de 2021
Comentada: darova el 6 de Abr. de 2021
Hello!
I have data with X(1xn), Y(1xn), and Z(nxn) matrix, with this data i can plot with surf . However, i would like to plot with plot3 with this data. How can i do that!.

Respuesta aceptada

darova
darova el 5 de Abr. de 2021
Try meshgrid
[X1,Y1] = meshgrid(X,Y);
plot3(X1,Y1,Z1)
line(X1',Y1',Z1')
  2 comentarios
Tin Truong Chanh
Tin Truong Chanh el 6 de Abr. de 2021
Your code works well. Thank you so much for your help!.
darova
darova el 6 de Abr. de 2021
you are welcome

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh 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