close all; % Make sure the figure window is big enough. If not, grow % it towards the bottom left. pos = get(gcf,'Position'); if pos(3) < minFigWidth pos(1) = pos(1) - (minFigWidth-pos(3)-1); if pos(1) < 1 pos(1) = 1; end; pos(3) = minFigWidth; end; if pos(4) < minFigHeight pos(2) = pos(2) - (minFigHeight-pos(4)-1); if pos(2) < 1 pos(2) = 1; end; pos(4) = minFigHeight; end; set(gcf,'Position',pos); % these parameters must be previously set. %N = 2; % number of times to play movie %FPS = 3; % frames per second movie(gcf,Mv,N,FPS,rect)