Making a video of fullscreen frames with getframe()

14 views (last 30 days)
Hi all,
I am currently making an animation in matlab from frames which I saved. It is working, however I would like to save the frames in the maximized format (the same as when you click on maximize in the top right corner for a figure). Unfortunately I cannot find a way to do this. I am using the getframe command from matlab and I looked in the documentation, but I can't find what I am looking for.
The code which I am using is:
movievector(k) = getframe;
end
MyWriter = VideoWriter('video1matlab');
MyWriter.FrameRate = 100;
open(MyWriter);
writeVideo(MyWriter, movievector);
close(MyWriter);
Where the movievector is defined in a for loop and contains all the frames that I would like to this. I obtain a video as a result, but with frames that are not maximized.
Any help is much appreciated,
Kind regards

Accepted Answer

KSSV
KSSV on 4 Jun 2019
Initilaize the figure using:
figure('units','normalized','outerposition',[0 0 1 1])

More Answers (0)

Categories

Find more on Animation 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!