Video making in MATLAB
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I'm trying to make video out of the function that suppose to generate 234 plot (Ro by GammamaxB) but it keeps telling me that Frame must be 370 by 326.
How can fix it...........
vidObj = VideoWriter('peaks123.avi');
open(vidObj);
for Ro = 0.05:0.05:0.45;
for GammamaxB = 0.5:0.1:3;
skyMap_i(Ro,GammamaxB);
set(gca, 'nextplot','replacechildren');
currFrame = getframe;
writeVideo(vidObj,currFrame);
end
end
% close(gcf)
%# save as AVI file, and open it using system video player
close(vidObj);
2 comentarios
Geoff Hayes
el 20 de Sept. de 2016
Toyese - what keeps telling you that the frame must be 370x326? Please copy and paste the full error message into this question.
Also, what is skyMap_i?
Respuestas (1)
Image Analyst
el 20 de Sept. de 2016
Editada: Image Analyst
el 20 de Sept. de 2016
For some reason, I think your image has changed size during the loop. Put this in the loop right after you call getframe:
size(currFrame) % Don't use a semi colon
Tell me what you see in the command window.
See attached demo where I make a movie from a changing/moving surface in a figure.
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!