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?
Afficher commentaires plus anciens
Please do tell me whether this possible- or suggest the closest solution.
Réponses (1)
bio lim
le 13 Juil 2015
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 commentaires
Walter Roberson
le 13 Juil 2015
When you use VideoWriter, every frame must be exactly the same size.
yashvin
le 15 Juil 2015
Catégories
En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!