- create an object (for example line)
- change it propeties in a loop
animation in matlab?
5 次查看(过去 30 天)
显示 更早的评论
how to make animation in matlab? i want to show animation for water flow and led blinking in matlab
0 个评论
采纳的回答
Grzegorz Knor
2011-9-16
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:
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!