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: spm_mesh_split.m
    path of file: ./repos/ExploreASL/External/SPMmodified
    
    the code of the file until where you have to start completion: function MS = spm_mesh_split(M, C)
% Split a surface mesh into its connected components 
% FORMAT MS = spm_mesh_split(M, C)

    
function MS = spm_mesh_split(M, C)
% Split a surface mesh into its connected components 
% FORMAT MS = spm_mesh_split(M, C)
% M         - a [nx3] faces array or a patch structure
% C         - a [nx1] vector containing labels for the connected components
%             or a logical vector indicating vertices to keep
%
% MS        - a patch structure array
%__________________________________________________________________________
% Copyright (C) 2010-2016 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: spm_mesh_split.m 6911 2016-10-26 12:10:58Z guillaume $

if isnumeric(M), M = struct('faces',M); end