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: removepath.m
    path of file: ./repos/Computer-Vision-and-AI/Content-Aware-Image-Resizing
    
    the code of the file until where you have to start completion: function [Enew, removeY] = removepath(E, Epath, row)
% removepath - starts from the last column in E and backtracks to remove
%   a connected path of pixels
%
% INPUTS
%   E- the energy function of the image
%   Epath - matrix denoting path from one pixel to the next
%   row- the starting row in the last column
% OUTPUTS
%   Enew- E after range of pixels has been removed
%   pathArray- the path removed from E

% TJ Keemon <keemon@bc.edu>
% October 2007

col = size(Epath, 2);
path = zeros(1,size(Epath, 2));
removeY = zeros(size(path));
 

    
function [Enew, removeY] = removepath(E, Epath, row)
% removepath - starts from the last column in E and backtracks to remove
%   a connected path of pixels
%
% INPUTS
%   E- the energy function of the image
%   Epath - matrix denoting path from one pixel to the next
%   row- the starting row in the last column
% OUTPUTS
%   Enew- E after range of pixels has been removed
%   pathArray- the path removed from E

% TJ Keemon <keemon@bc.edu>
% October 2007

col = size(Epath, 2);
path = zeros(1,size(Epath, 2));
removeY = zeros(size(path));
 
for i=1:size(Epath, 2)
    row = row + Epath(row,col);
    path(i) = sub2ind(size(Epath), row, col);
    removeY(i) = row;
   
    col = col -1;
end