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: computeProjs.m
    path of file: ./repos/scGEAToolbox/+run/thirdparty/MPPC
    
    the code of the file until where you have to start completion: function [I_new] = computeProjs(x, y, I, cut_indices)
%computeProjs computes non-discrete projections to the polygonal curve,

    
function [I_new] = computeProjs(x, y, I, cut_indices)
%computeProjs computes non-discrete projections to the polygonal curve,
%given the closest point in y.
% This function computes the projections onto edges of y, and is used in
% computing the continuous MPPC energy. Note that projections computed here
% are approximate, given projections onto the vertices of y. That is, this
% function will only project data to the edge (y_i, y_{i+1}) if the data
% either projects to y_i or y_{i+1}.
% The argument 'I' may be passed as empty, in which case it will be
% computed here.

[m, d] = size(y);
[~, ~] = size(x);

if isempty(I)
    I = dsearchn(y, x)';
end