Clear Filters
Clear Filters

Saving movie of solution profile

1 view (last 30 days)
Hi, I'm creating a figure to see the progression of a solution in time:
figure
fig = plot(r, u(1,:), 'erase', 'xor')
for k = 2:length(t)
set(fig, 'xdata', r, 'ydata', u(k,:))
pause(.5)
title('Progression of Solution Profile in Time')
xlabel('Distance r')
ylabel('u(r,t)')
end
I would like to save this as a video file (preferably mp4, but avi is fine too). Can anyone help with this?
Thanks!

Accepted Answer

Walter Roberson
Walter Roberson on 3 Aug 2015
Use the VideoWriter class. See the second example

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!