How can I change the values of a plot inside a loop?
Show older comments
Hi all,
I want to plot something and then change the values of some variables inside a loop without plotting everything again. I think something as 'handle' and 'set' would help but, honestly, I do no have any idea of how to use it. I am going to use real-time data, so I want to use quick functions, this is the reason because I don't want to plot again and just change the values inside a plot already defined. Something like that:
h=plot(x,y)
n=0;
while n<5
x=x+n;
y=y-n;
%%change the values of x and y in the previous plot%%
n=n+1;
end
Accepted Answer
More Answers (1)
Lobo
on 11 Dec 2013
0 votes
Categories
Find more on MATLAB 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!