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: polyExtrude.m
    path of file: ./repos/GIBBON/lib
    
    the code of the file until where you have to start completion: function [varargout]=polyExtrude(Vc,controlParameterStruct)

% function [varargout]=polyExtrude(Vc,controlParameterStruct)
% ------------------------------------------------------------------------
% The polyExtrude function can be used to extrude a polygon to obtain a
% surface. 
% 
% 2023/05/08: Added function comments
% ------------------------------------------------------------------------


    
function [varargout]=polyExtrude(Vc,controlParameterStruct)

% function [varargout]=polyExtrude(Vc,controlParameterStruct)
% ------------------------------------------------------------------------
% The polyExtrude function can be used to extrude a polygon to obtain a
% surface. 
% 
% 2023/05/08: Added function comments
% ------------------------------------------------------------------------

%% COMPUTE CURVE LENGTH
D=max(pathLength(Vc)); %Compute curve length for point sampling
numPoints=size(Vc,1);

%% Cope with 2D input
if size(Vc,2)==2
    Vc(:,3)=0;
end