how to animate circle

2 次查看(过去 30 天)
david mualem
david mualem 2021-4-9
Hello everyone, I want to write code through a plot function that will draw a circle in red, when half a circle will start counterclockwise and the other half will start clockwise and meet in the middle, thank you all!

回答(1 个)

Abdolkarim Mohammadi
You first draw the single point at the top of the circle. Then you edit the XData and YData properties of the line after a pause. For example:
h = plot (0, 0);
for i = ...
h.XData = horzcat (h.XData, NewPointsX);
h.YData = horzcat (h.YData, NewPointsY);
pause (0.5);
end

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by