Video example
% This example is adapted from 'help VideoWriter'
figure(1); clf;
% Prepare the new file.
vidObj = VideoWriter('peaks.avi');
open(vidObj);
% Create an animation.
Z = peaks; surf(Z);
axis([1 50 1 50 -10 10]);
set(gca,'nextplot','replacechildren');
currFrame = getframe;
% Determine size of the frame in pixels.
rect = size(currFrame.cdata);
for k = 1:40
surf(sin(2*pi*k/20)*Z,Z);
drawnow;
% Write each frame to the file.
currFrame = getframe(gcf,[1 1 rect(1:2)]);
writeVideo(vidObj,currFrame);
end
% Close the file.
close(vidObj);
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
30 | 31 | 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 1 | 2 | 3 |
Get Free Quote!
297 Experts Online