What is the best way to draw a variable number of circles in a plot and update their position?
I have tried
F = rectangle('Position', [(Xpositions - radius) ... (Ypositions - radius) radius*2 radius*2], ... 'Curvature', [1, 1], 'LineStyle', '--', ... 'EdgeColor', 'r', 'LineWidth', 3);
but since I have multiple circles I would have to create a for loop to draw each circle.
F = viscircles([Xpositions, Ypositions], ... radii, 'LineStyle', '--', 'EdgeColor', 'r', 'LineWidth', 3);
seems to work fine and draw the circles, but it does not provide of a way to update the positions of the circles.
Best Answer