- create an object (for example line)
- change it propeties in a loop
animation in matlab?
5 views (last 30 days)
Show older comments
how to make animation in matlab? i want to show animation for water flow and led blinking in matlab
0 Comments
Accepted Answer
Grzegorz Knor
on 16 Sep 2011
There is a lot of options. The main idea is as follows:
simple example:
figure('menubar','none','color','k')
h = plot(sin(sqrt(2)*0+sqrt(3)),cos(sqrt(5)*0),'r.','MarkerSize',20);
xlim([-1 1])
ylim([-1 1])
axis off
for t=0.01:.01:100
set(h,'xdata',sin(sqrt(2)*t+sqrt(3)),...
'ydata',cos(sqrt(5)*t))
drawnow
end
See also:
More Answers (0)
See Also
Categories
Find more on Animation 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!