plot variable values of loop

1 view (last 30 days)
Ani Asoyan
Ani Asoyan on 2 Apr 2020
Edited: Ani Asoyan on 3 Apr 2020
I have a code like this
for k=1:3
if %one condition
if %the other condition
Basically I've written a loop in which I change the value of d
I have 3 iterations and 3 values of d.
I want to plot the values of d against the iteration's number, so that the x axis will be the iteration numbers and the y axis will be the values of d. How can I do this?
I've searched similar questions but haven't found like this one.
Thank you
Ani Asoyan
Ani Asoyan on 3 Apr 2020
Edited: Ani Asoyan on 3 Apr 2020
I got it ! Thank you sooo much!!

Sign in to comment.

Answers (0)


Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!