Hi all, i have problem with making video from 3D matrix. I read other people examples and i tried to repeat them.
but Matlab gives me error:
v = VideoWriter('TeAc.avi');open(v);%% initial frame
Z = Di3(:,:,1);Z=surf(Z); Z.LineStyle='none';axis tight manual colormap jetset(gca,'nextplot','replacechildren');%% Loop of images
for k = 1:2550 Z=surf(Di3(:,:,k)); Z.LineStyle='none'; axis tight manual colormap jet set(gca,'nextplot','replacechildren'); frame = getframe; writeVideo(v,frame);endclose(v);
Error using VideoWriter/writeVideo (line 356)
Frame must be 435 by 343
frame.cdata is 344*435*uint8
Best Answer