"[...] to make a ball bounce back and forth between to walls" This is as fast as it gets - I think (with m-code)
x=1;y=1;
ball_bounce1= plot(x,y,'o');
ball_bounce1.MarkerSize = 24;
axis([-1 31 -1 31])
grid on
N = 400;
for jj = 1 : N
set( ball_bounce1,'XData',jj*30/N, 'YData',jj*30/N );
drawnow
end
2 Comments
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/656258-how-can-i-make-this-animation-faster-in-matlab#comment_1151583
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/656258-how-can-i-make-this-animation-faster-in-matlab#comment_1151583
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/656258-how-can-i-make-this-animation-faster-in-matlab#comment_1151798
Direct link to this comment
https://nl.mathworks.com/matlabcentral/answers/656258-how-can-i-make-this-animation-faster-in-matlab#comment_1151798
Sign in to comment.