I am making an AVI file of a rotating image. When I use the following code to rotate my axes and capture frames:
% create an AVI object
aviobj = avifile('myAVI.avi');% create peaks plot
surf(peaks(30))% freezes aspect ratio properties to enable rotation
% and turn off all axis lines, tick marks, and labels
axis vis3d off;for i = 1:30 % rotate view
view(-90-i,18); % get frame
F = getframe; % add frame F to aviobj
aviobj = addframe(aviobj,F);end% close aviobj
aviobj = close(aviobj);
I receive the following error:
??? Error using ==> avifile/addframe (ValidateFrame) Frame must be 224 by 280.
Best Answer