My line plot is not showing

5 views (last 30 days)
JAmyl Andino
JAmyl Andino on 18 Oct 2021
Commented: JAmyl Andino on 18 Oct 2021
I have a for loop with all its values that i want to plot but the graph shows up and the line doesn't (below for evaluation):
for i=1:Ns
t(i) = Tt2m/Tt_1;
p(i) = (t(i)^((G*e_c)/(G-1)));
Tt1= Tt2;
Tt2 = Tt2 + DT_t;
end
plot (1:Ns,p(i))

Accepted Answer

Dave B
Dave B on 18 Oct 2021
Edited: Dave B on 18 Oct 2021
Did you want to plot 1:Ns vs p (without the i)?
plot(1:Ns,p)
  3 Comments
JAmyl Andino
JAmyl Andino on 18 Oct 2021
Thanks for your help!

Sign in to comment.

More Answers (0)

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by