PRACTICAL MATLAB® FOR ENGINEERS PRACTICAL MATLAB

(sharon) #1

Time Domain Representation of Continuous and Discrete Signals 57


in a (for-end) loop, to assemble an array of movie frames, spaced over time by its
looping index.
R.1.174 For example, the following MATLAB sequence can be used to assemble a movie,
based on the contents of the current fi gure window over n.

MATLAB Solution
for frame=1:n
M(frame) = getframe; % captures the current figure as a frame
of M
end

R.1.175 The MATLAB command movie(M) displays the recorded M array containing
all the frames of M, one frame after the other in sequential ascending order:
frame(1), frame(2), frame(3), ..., frame(n − 1), frame(n).

FIGURE 1.47
(See color insert following page 374.) First color derivative plot of the magic matrix of R.1.169.

gradient of magic (10)
1 2 3 4 5 6 7 8 9

10
12345678910

FIGURE 1.48
(See color insert following page 374.) Second color derivative plot of the magic matrix of R.1.169.

second derivative (deI2) of magic(10)
1 2 3 4 5 6 7 8 9

10
12345678910
Free download pdf