我想記錄我正在創建的幀的4分鐘模擬。這裏是我的代碼:更改VideoWriter類中視頻的持續時間
%% Creating the video with VideoWriter
writerObj = VideoWriter('RAW.avi');
writerObj.FrameRate=4;
open(writerObj);
k=0;
while k < N
cell_prev=cell;
cell=newStep_noise(cell_prev,n,H1,M,H2,D,K,P);
diff_norm_vect=computeDiff(cell,n);
scatter(X,Y,50,diff_norm_vect,'filled');
frame = getframe;
writeVideo(writerObj,frame);
k=k+1;
end
close(writerObj);
我不能使用writerObj.Duration=240;
的持續時間是隻讀的VideoWriter
類屬性。