Graph plot always appears as a straight line
이전 댓글 표시
Hi, I don't know how to fix this. y graph looks like a straight line instead of an exponential curve. Please help me.. thanks a lot in advance !
l=0.5;
i=22/7;
v=0.8;
p=0.1;
x=[0:0.2:1.0];
y=(p*r^4*x)/(8*v*l);
plot(x,y)
댓글 수: 5
Abhinandana R
2019년 1월 23일
Stephen23
2019년 1월 23일
"y varies according to r"
But what you calculated is y varing with x.
Abhinandana R
2019년 1월 23일
madhan ravi
2019년 1월 23일
see Rik Wisselink’s answer below
채택된 답변
추가 답변 (1개)
Kevin Phung
2019년 1월 23일
편집: Kevin Phung
2019년 1월 23일
0 개 추천
if r is a constant, you will get a straight line. if r varies, then you will get a curve.
also, you may want to add a period before your raising to a power and multiplcation for non-scalars.
so .^ and .*
카테고리
도움말 센터 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

