title: Loop through video file frame by frame in matlab
body: <p>I need to loop through a video file in matlab frame by frame manipulate every frame (for image background substracting) and save the result to a new file, I cant figure out how to do that though because i am using VideoReader and VideoWriter libs and I cant figure out how to do that.
  DISCLAIMER - this is for a hw assignment I would like to get only the answer of how to use the VideoReader and VideoWriter in a for loop (for the whole movie) as for the image substraction - I will handle this myself...
  thanks in advance...</p>