frames2gif
版本 1.0.0.0 (1.8 KB) 作者:
Paxon Frady
Converts frames captured by getframes to an animated gif.
If you want to make an animated GIF from matlab its a pain. But there is a way to do it. With this function you can make your movie in for loop, and then get each frame with getframe. Then send that through frames2gif and you'll get an animated gif out. The function is pretty simple, it's just a bit tricky.
fh = figure();
for i = 1:num_frames
% Draw a frame on the figure.
frames(i) = getframe(fh);
end
frames2gif('my_movie.gif', frames, 'DelayTime', 0, 'LoopCount', Inf); % For a looping gif.
引用格式
Paxon Frady (2026). frames2gif (https://ww2.mathworks.cn/matlabcentral/fileexchange/37529-frames2gif), MATLAB Central File Exchange. 检索时间: .
MATLAB 版本兼容性
创建方式
R2010a
兼容任何版本
平台兼容性
Windows macOS Linux类别
- MATLAB > Graphics > 2-D and 3-D Plots > Animation >
在 Help Center 和 MATLAB Answers 中查找有关 Animation 的更多信息
标签
致谢
启发作品: gif
| 版本 | 已发布 | 发行说明 | |
|---|---|---|---|
| 1.0.0.0 |
