animation of figures in sequence

8 views (last 30 days)
Alberto Acri
Alberto Acri on 24 Dec 2020
Commented: KALYAN ACHARJYA on 24 Dec 2020
Hi! Let me explain the problem.
I have several figures inserted into a single graph using "hold on" and "hold off" and I display them in steps using the "pause" command.
I want to create an animation of these figures in sequence.
How can I do it?

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Dec 2020
Edited: KALYAN ACHARJYA on 24 Dec 2020
More
https://www.mathworks.com/help/matlab/ref/drawnow.html
  2 Comments
Alberto Acri
Alberto Acri on 24 Dec 2020
no, that's not what I wanted. Maybe I misspoke. How can I create a gif that shows the sequence of the plotted figures ?
KALYAN ACHARJYA
KALYAN ACHARJYA on 24 Dec 2020
Example:
x=0:0.1:10;
for i=1:length(x)
y=randi(10)*log(x);
plot(x,y)
drawnow
pause(0.03);
end
Do you want to save the plot all frames as gif?

Sign in to comment.

Categories

Find more on Animation in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!