Creating Animation in Scilab

余生颓废 提交于 2019-12-03 21:56:23
scf(1);clf;
x=linspace(0,10,100);
y=sin(x);

plot(x(1),y(1),"o")
h_compound = gce();
h_point=h_compound.children
h_point.mark_size = 20;
h_point.mark_background = 2;
h_axes = gca();
h_axes.data_bounds = [0,-1;10,1];  
realtimeinit(0.1);
for i=1:100
  realtime(i);//wait 0.1 second before drawing the new position
  h_point.data=[x(i),y(i)];
end
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!