vidObj = VideoReader('Motion.avi');
% Read video frames until the end of the file is reached by using the readFrame method.
vidframes = read(vidObj,[1 Inf]); % you can read from [4 inf] and then write
% Write video
v = VideoWriter('Test.avi');
% skip the first three frames
vidframes = vidframes(:,:,:,3:end) ;
% write the video
open(v)
writeVideo(v,vidframes)
close(v)