how to plot three variables in a line graph with values ?
Mostrar comentarios más antiguos
ax[1] = 0.98 ax[2] = 1.2 ax[3] = 0.23
bx[1] = 2.1 bx[2] = 0.236 bx[3] = 1.25
cx[1] = 0.01 cx[2] = 0.025 cx[3] = 0.52
plot(ax,bx,cx); is possible ?
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 14 de Mayo de 2013
Editada: Azzi Abdelmalek
el 14 de Mayo de 2013
ax(1) = 0.98
ax(2) = 1.2
ax(3) = 0.23
bx(1) = 2.1
bx(2) = 0.236
bx(3) = 1.25
cx(1) = 0.01
cx(2) = 0.025
cx(3) = 0.52
plot(ax,bx,cx)
Use () instead of [ ]
2 comentarios
What do you expect as output, when you call plot() with three vectors?
I get this for your code:
??? Error using ==> plot
Data must be a single matrix Y or a list of pairs X,Y
Waleed Eid
el 17 de Abr. de 2022
you have incorrect code.
Error using plot
Data must be a single input of y --values or
one or more pairs of x -- and y--values.
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!