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

% function [C]=patchConnectivity(F,V,conTypes)
% -----------------------------------------------------------------------
% This functions creates connectivity matrices for the input patch data
% defined by the faces F and the vertices V. The output is a structure
% containing the connectivity matrices:

    
function [C]=patchConnectivity(varargin)

% function [C]=patchConnectivity(F,V,conTypes)
% -----------------------------------------------------------------------
% This functions creates connectivity matrices for the input patch data
% defined by the faces F and the vertices V. The output is a structure
% containing the connectivity matrices:
%
% C.vertex.vertex
% C.vertex.face
% C.vertex.edge
% 
% C.edge.face
% C.edge.vertex
% C.edge.edge
% 
% C.face.vertex
% C.face.face
% C.face.edge
% 
% Change log: 
% 2018/08/22 
% 2019/04/22 Changed variable names to be more descriptive
% 2019/04/22 Improved function performance by creating optional output
% requests for output structure. Can be controlled through input conTypes
% 2020/05/13 Fixed bug in edgeFaceConnectivity when edges connect to more
% than 2 faces
%
% To do: 
% Check efficiency and compare to tesIND
% -----------------------------------------------------------------------

%% Parse input
switch nargin
    case 1
        F=varargin{1};
        V=[]; 
        conTypes='all';
    case 2
        F=varargin{1};
        V=varargin{2};
        conTypes='all';
    case 3
        F=varargin{1};
        V=varargin{2};
        conTypes=varargin{3};
    otherwise
        error('Wrong number of input arguments')
end