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: timewarp.m
    path of file: ./repos/eeglab/functions/timefreqfunc
    
    the code of the file until where you have to start completion: function M=timewarp(evLatency, newLatency)

    
function M=timewarp(evLatency, newLatency)
% TIMEWARP   - Given two event marker vectors, computes a matrix
%                that can be used to warp a time series so that its
%                evlatencies match newlatencies. Values of the warped
%                timeserie that falls between two frames in the original
%                timeserie will be linear interpolated.
% Usage:
%   >> warpmat = timewarp(evlatency, newlatency)
%
% Necessary inputs:
%   evlatency  - [vector] event markers in the original time series, in frames
%                Markers must be ordered by increasing frame latency. 
%                If you want to warp the entire time-series, make sure 
%                the first (1) and last frames are in the vector.
%   newlatency - [vector] desired warped event time latencies. The original
%                time series will be warped so that the frame numbers of its 
%                events (see evlatency above) match the frame numbers in 
%                newlatency. newlatency frames must be sorted by ascend