Creating Animation in Scilab -


i able plot point using x , y coordinates using following code.

figure(1); plot(x(1),y(1),'o'); h_compound = gce(); h_compound.children.mark_size = 20; h_compound.children.mark_background = 2; h_axes = gca(); h_axes.data_bounds = [0,0;100,100];     

my program contains loop keeps on refreshing coordinate values. every time loop executed point plotted in same graphic, such new points overlap older ones. how make old points disappear new points plotted animation-like sequence generated?

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); i=1:100   realtime(i);//wait 0.1 second before drawing new position   h_point.data=[x(i),y(i)]; end 

Comments

Popular posts from this blog

PHP while loop dynamic rowspan -

android - How to read a column value in parse.com without accessing an object or a pointer -

timer - Java TimerTask cancel -