plot of 3 variables

8 visualizaciones (últimos 30 días)
Lincy Elizebeth Jim
Lincy Elizebeth Jim el 24 de Jun. de 2015
Comentada: Walter Roberson el 24 de Jun. de 2015
Hi all
I have
p=0:0.2:1
m=0:2.5:12.5
x=p./m
is it possible to have a plot of x, p, m
kindly guide
thanking in advance
lincy
  2 comentarios
Purushottama Rao
Purushottama Rao el 24 de Jun. de 2015
Do u want to plot two variables against the third variable?
Lincy Elizebeth Jim
Lincy Elizebeth Jim el 24 de Jun. de 2015
is it possible to see p,x ,m as 3 separate lines ? for each value of p can i see x v/s m

Iniciar sesión para comentar.

Respuestas (2)

Azzi Abdelmalek
Azzi Abdelmalek el 24 de Jun. de 2015
Editada: Azzi Abdelmalek el 24 de Jun. de 2015
plot3(p,m,x)
  1 comentario
Lincy Elizebeth Jim
Lincy Elizebeth Jim el 24 de Jun. de 2015
hi
is it possible to see them as three separate lines in a single plot

Iniciar sesión para comentar.


Walter Roberson
Walter Roberson el 24 de Jun. de 2015
plot(1:length(p), p, 'r', 1:length(p), m, 'g', 1:length(p), x, 'b')
this would plot p in red, m in green, and x in blue.
  2 comentarios
Lincy Elizebeth Jim
Lincy Elizebeth Jim el 24 de Jun. de 2015
is it possible to have a 3 d plot where there are 3 separate axes for p,m and x and the separate plots for p,m and x together
Walter Roberson
Walter Roberson el 24 de Jun. de 2015
What I suspect you need is
p=0:0.2:1
m=0:2.5:12.5
[P, M] = ndgrid(p, m);
X = P ./ M;
surf(p, m, X)

Iniciar sesión para comentar.

Categorías

Más información sobre Log 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