Why can the coordinates in "stem3" be defined only as vectors not matrices?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Rightia Rollmann
el 22 de En. de 2017
Respondida: Star Strider
el 22 de En. de 2017
Why can the coordinates in "stem3" be defined only as vectors not matrices?
0 comentarios
Respuesta aceptada
Star Strider
el 22 de En. de 2017
The stem plots are intended to depict discrete data, specifically relating to signal processing, not the continuous data of other plots. If you have a matrix, use surf or mesh or related functions.
You can use stem3 with matrix arguments if you convert them into vectors first. For example if ‘X’, ‘Y’ and ‘Z’ are equal-sized matrices, you can convert them to vectors and plot them as:
figure(1)
stem3(X(:), Y(:), Z(:))
grid on
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh 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!