how to plot this equation?
조회 수: 2 (최근 30일)
이전 댓글 표시
p= (B-(b*t))/(sigma);
I need this equation to be plot as t increase by 1
for t= 0:1:
p(t)= (B-(b*t))/(sigma); plot(t,p)
How do I do it? Please help
댓글 수: 0
채택된 답변
Walter Roberson
2012년 11월 20일
t = 0 : 0.1 : 1;
for K = 1 : length(t)
p(K) = (B-(b*t(K)))/(sigma);
end
plot(t, p)
(Note: there are more efficient ways of doing it, but this is the closest correspondence to your current code.)
댓글 수: 4
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!