Hi I want to plot any desired number of circles in one plot for a billiard game. Creating each rectangle for itself isnt so handy because I would like to plot theoratically an infinite number of balls.
Thats why I wondered if its possible to plot the same object/rectangle at different positions at the same time. I tried using hold on. But it shows still only one ball.
for k1 = 1:length(t)
for k2 = 1:4:num_variables
set(redball,'Position',[y_total(k1,k2)-r, y_total(k1,k2+2)-r, 2*r, 2*r]);
How would you solve this?
Thanks in advance!!