50 likes | 200 Views
Introduction to Matlab:. Matlab Graphics. Animated Movies. S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn. Matlab Movies. A Movie is stored as a sequence of Frames. A Frame is a graph or a picture stored as a matrix or array.
E N D
Introduction to Matlab: Matlab Graphics Animated Movies S. Awad, Ph.D. M. Corless, M.S.E.E. E.C.E. Department University of Michigan-Dearborn
Matlab Movies • A Movie is stored as a sequence of Frames • A Frame is a graph or a picture stored as a matrix or array
Number of Frames per Sec Number of Times Movie is Played Matrix Storing entire set of Frames Movie Command • Let m be a matrix of Frames • Each Frame occupies one column of m movie( m, n, fps )
16-Frame Example • m = moviein(n) creates a matrix to hold n frames of a movie based on the current axis. • m(:,j) = getframe returns a column vector with one movie frame. The frame is a snapshot of the current figure axis. m = moviein(16); % Reserve 16 frames for j=1:16 plot(fft(eye(j+16))); % Draw a Figure m(:,j)=getframe; % Make it a frame end
Movie Frames » movie(m,1,2)