Excellent, thank you. Still have to fully understand the theory though :)
Users of Linux hope this helps: video_file should be set to the full path, e.g. '/opt/matlab/.../SECOND.AVI', and have gstreamer0.10 plugins installed.
If you do not have mmreader, check out mmread from fileexchange. mmread does not instantiate a class, it returns a struct and therefore all set, get, read in the original test files should be replaced to access struct members.
video = mmread(video_file);
nb_frame = video.nrFramesTotal - offset_frame - 10;
dim_x = video.width;
dim_y = video.height;
ln127 : I = video.frames(offset_frame + 1).cdata;
ln158 : I = video.frames(offset_frame + k).cdata;