parameter.  

 Once you are done using the videoWriter, make sure you call CLOSE so
 that any system resources allocated by the plugin may be released.
 Here's a simple example of how you might use videoWriter to create
 a video of continually adding more motion blur to an image:

   % Construct a videoWriter object
   vw = videoWriter('writertest.avi', ...
                    'width',320, 'height',240, 'codec','xvid');
   img = imread('peppers.png');
   h = fspecial('motion',10,5);
   for i=1:1