plot of 3 variables
Afficher commentaires plus anciens
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 commentaires
Purushottama Rao
le 24 Juin 2015
Do u want to plot two variables against the third variable?
Lincy Elizebeth Jim
le 24 Juin 2015
Réponses (2)
Azzi Abdelmalek
le 24 Juin 2015
Modifié(e) : Azzi Abdelmalek
le 24 Juin 2015
plot3(p,m,x)
1 commentaire
Lincy Elizebeth Jim
le 24 Juin 2015
Walter Roberson
le 24 Juin 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 commentaires
Lincy Elizebeth Jim
le 24 Juin 2015
Walter Roberson
le 24 Juin 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)
Catégories
En savoir plus sur 2-D and 3-D Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!