Can i record a figure as it is being plotted so that i can send it as an email attachment and viewed by someone who does not have matlab?
7 ビュー (過去 30 日間)
古いコメントを表示
Please do tell me whether this possible- or suggest the closest solution.
0 件のコメント
回答 (1 件)
bio lim
2015 年 7 月 13 日
writerObj = VideoWriter('example.avi');
writerObj.FrameRate = 60;
open(writerObj);
Z = peaks; surf(Z);
axis tight
set(gca,'nextplot','replacechildren');
set(gcf,'Renderer','zbuffer');
for k = 1:20
surf(sin(2*pi*k/20)*Z,Z)
frame = getframe;
writeVideo(writerObj,frame);
end
close(writerObj);
The animated plot is saved as an .avi file.
4 件のコメント
Walter Roberson
2015 年 7 月 13 日
When you use VideoWriter, every frame must be exactly the same size.
参考
カテゴリ
Help Center および File Exchange で Animation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!