plot of 3 variables

조회 수: 5 (최근 30일)
Lincy Elizebeth Jim
Lincy Elizebeth Jim 2015년 6월 24일
댓글: Walter Roberson 2015년 6월 24일
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
Purushottama Rao
Purushottama Rao 2015년 6월 24일
Do u want to plot two variables against the third variable?
Lincy Elizebeth Jim
Lincy Elizebeth Jim 2015년 6월 24일
is it possible to see p,x ,m as 3 separate lines ? for each value of p can i see x v/s m

댓글을 달려면 로그인하십시오.

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 6월 24일
편집: Azzi Abdelmalek 2015년 6월 24일
  댓글 수: 1
Lincy Elizebeth Jim
Lincy Elizebeth Jim 2015년 6월 24일
hi
is it possible to see them as three separate lines in a single plot

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2015년 6월 24일
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
Lincy Elizebeth Jim
Lincy Elizebeth Jim 2015년 6월 24일
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 2015년 6월 24일
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)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Log Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by