You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: savevideoframes.m
    path of file: ./repos/3DCS/utils
    
    the code of the file until where you have to start completion: function [  ] = savevideoframes( vpath,fpath,params )
%SAVEVIDEOFRAMES Save all the frames of a video
%   SAVEVIDEOFRAMES(vpath,fpath,params) saves all the video frames from

    
function [  ] = savevideoframes( vpath,fpath,params )
%SAVEVIDEOFRAMES Save all the frames of a video
%   SAVEVIDEOFRAMES(vpath,fpath,params) saves all the video frames from
%   vpath to the directory fpath.

% [0] parameters configuration
width  = params.width;
height = params.height;
format = params.format;

% [1] read the video file from vpath
mov = yuv2mov(vpath,width,height,format); % convert 

% [2] save all the frames
if ~exist(fpath,'dir')
    mkdir(fpath);
end