how can I plot values from diffrent runts into the same graph

2 views (last 30 days)
I am running a code with a variable A and I get at the end of the code a number and then I would like to change the value of the value of A and run again, So How can I plot these two numbers from different runs into the same graph and connect them example A= 5 run my code and then I get b=3 plot(A,b) and then second run A= 7 run the code and I get b=2 Plot(A,b) how can I connect those to points into one graph ( I don't want to make A a vector )

Answers (1)

madhan ravi
madhan ravi on 20 Oct 2018

use :

hold on 

after plot command

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!