I am using the writeVideo command and while it successfully makes the .avi file, when I play it outside of matlab it plays very fast. Is this a problem with my script or something else?
vidObj = VideoWriter('pr_lgm_r1_ccsm4.avi');open(vidObj);
X=squeeze(pr(:,:,i));figurecontourf(lon,lat,X','LineStyle','none')pause(1.0); %slow down frames% Write each frame to the file.currFrame = getframe(gcf);writeVideo(vidObj,currFrame);cla;end% Close the file.close(vidObj);
Any advice appreciated