Not documented
The following code
fn = fullfile (tempdir(), "sombrero.mp4"); w = VideoWriter (fn); open (w); z = sombrero (); hs = surf (z); axis manual nframes = 100; for ii = 1:nframes set (hs, "zdata", z * sin (2*pi*ii/nframes + pi/5)); drawnow writeVideo (w, getframe (gcf)); endfor close (w) printf ("Now run '%s' in your favourite video player or try 'demo VideoReader'!\n", fn);
Produces the following output
Now run '/tmp/sombrero.mp4' in your favourite video player or try 'demo VideoReader'!
and the following figure
Figure 1 |
---|
Package: video