Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

how can i make a video in matlab from animated code?,how 2 turn this code to a video for example.

1 Ansicht (letzte 30 Tage)
writerObj = VideoWriter('peaks.avi');
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);
  1 Kommentar
Geoff Hayes
Geoff Hayes am 27 Aug. 2014
nusiaba - isn't that what the code is doing? Creating 20 frames for the peaks.avi video? This code seems to be from the second example of videowriter class.

Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by