how to use plot3 for x,y,z, while plotting.. it shows nothing

i have to use plot3 function to plot x,y,z
x=[1]
y=[2]
z=[3]
plot3(x,y,z)
while i plot this , nothing appears on the plot.. how to plot this in 3d

 Respuesta aceptada

KSSV
KSSV el 9 de Mzo. de 2018
plot3(x,y,z,'.r')
As you have single data..you need to use a marker.

3 comentarios

now, i have another set of x,y,z for ex: x=[2] y=[4] z=[6] and plot it in the same plot and want to connect these two points(this and the previous one).. then how to do it ??
@Veera Kanmani: you cannot plot points separately and then connect them with a line afterwards. You will need to plot all of the points at once. You can do this trivially by putting all of the points into matrices. See the plot documentation for examples of this.
@Stephen Cobeldick: thank you.. i will look into it

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 9 de Mzo. de 2018

Comentada:

el 9 de Mzo. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by