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: subTriCentre.m
    path of file: ./repos/GIBBON/lib
    
    the code of the file until where you have to start completion: function [Fn,Vn]=subTriCentre(F,V,L)

% function function [Fn,Vn]=subTriCentre(F,V,L)
% ------------------------------------------------------------------------
% This function splits the faces defined by L up into three by introducing
% a central node. 
%
%
% Kevin Mattheus Moerman
% kevinmoerman@hotmail.com
% 2014/06/03
%------------------------------------------------------------------------

    
function [Fn,Vn]=subTriCentre(F,V,L)

% function function [Fn,Vn]=subTriCentre(F,V,L)
% ------------------------------------------------------------------------
% This function splits the faces defined by L up into three by introducing
% a central node. 
%
%
% Kevin Mattheus Moerman
% kevinmoerman@hotmail.com
% 2014/06/03
%------------------------------------------------------------------------

numPoints=size(V,1);
Fs=F(L,:); %Faces to split

%Get face centres
X=V(:,1); Y=V(:,2); Z=V(:,3);
if nnz(L)==1 %treat different behaviour for since face problem
    XF=mean(X(Fs),1);
    YF=mean(Y(Fs),1);
    ZF=mean(Z(Fs),1);
else
    XF=mean(X(Fs),2);
    YF=mean(Y(Fs),2);
    ZF=mean(Z(Fs),2);
end