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

% function [Fd,Vd,seedIndex,indSeed]=remeshTriSurfDistMap(F,V,numSeeds,startInds,optionStruct)
% ------------------------------------------------------------------------
% Inputs: 
% F = input mesh faces
% V = input mesh vertices

    
function [varargout]=remeshTriSurfDistMap(varargin)

% function [Fd,Vd,seedIndex,indSeed]=remeshTriSurfDistMap(F,V,numSeeds,startInds,optionStruct)
% ------------------------------------------------------------------------
% Inputs: 
% F = input mesh faces
% V = input mesh vertices
% numSeeds = number of desired vertices (must be much less than length(V))
% startInds = points to start the remeshing from (optional). These points will be included in the output mesh
% W = point weights (optional)
% Outputs: 
% Fd = Output mesh faces
% Vd = Output mesh vertices
% seedIndex = indices of selected output vertices for each index vertex
% indSeed = indices of input vertices selected for the output mesh
%
% 
% Kevin Mattheus Moerman
% gibbon.toolbox@gmail.com
% 
% Change log:
% 2018/03/27 updated to use meshDistMarch as alternative to mex functions
% 2018/03/27 Made use of seedIndex2triangulation function which also
% filters unused points. 
%
% ------------------------------------------------------------------------

%% PARSE INPUT

%Default option structure
defaultOptionStruct.toleranceLevel=0;
defaultOptionStruct.waitBarOn=true(1,1);

switch nargin
    case 3
        F=varargin{1};
        V=varargin{2};
        numSeeds=varargin{3};
        startInds=1; %Use first point as only start 
        optionStruct=defaultOptionStruct;
    case 4
        F=varargin{1};
        V=varargin{2};
        numSeeds=varargin{3};
        startInds=varargin{4};         
        optionStruct=defaultOptionStruct;
    case 5
        F=varargin{1};
        V=varargin{2};
        numSeeds=varargin{3};
        startInds=varargin{4};        
        optionStruct=varargin{5};
    otherwise
        error('Wrong number of input arguments!')
end