Intended as a drop-in alternative for the excellent gif function by Chad A. Greene, with the main aim of reducing file size when many animations are included in a PowerPoint presentation. Function is designed to allow quick creation of animations in MPEG-4 file format.
The format has the limitation that there's no easy way to loop infinitely as gifs can, but this can be overcome by either (1) Repeating the frames a large number of times (at the cost of increased file size); or (2) Looping the video within the playback settings of PowerPoint.
Example useage:
t = linspace(0, 2.*pi, 128);
for tCount = 1 : length(t)
figure(1); plot( t, sin(t - t(tCount)) ); drawnow();
if tCount == 1
mp4( 'test', 'DelayTime', 1./10 );
else
mp4();
end
end
mp4('close')
Zitieren als
Scott Schoen Jr (2025) mp4 - Easy MPEG animation creation in MATLAB
Kompatibilität der MATLAB-Version
Erstellt mit
R2024b
Kompatibel mit R2010b und späteren Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Quellenangaben
Inspiriert von: gif
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.1 | Fixed typos, added keywords. |
||
| 1.0.0 |
