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_calc.m
    path of file: ./repos/bspm/thirdparty/spm12
    
    the code of the file until where you have to start completion: function Mo = spm_mesh_calc(Mi,Mo,f,varargin)
% Evaluate a function on a mesh's data
% FORMAT Mo = spm_mesh_calc(Mi,Mo,f,opts)
% Mi   - input filenames (char array or cellstr)

    
function Mo = spm_mesh_calc(Mi,Mo,f,varargin)
% Evaluate a function on a mesh's data
% FORMAT Mo = spm_mesh_calc(Mi,Mo,f,opts)
% Mi   - input filenames (char array or cellstr)
%        or cell array of gifti objects or patch structures
% Mo   - output filename
%        if empty, a gifti object is returned and not saved on disk
% f    - MATLAB expression to be evaluated (string or function handle)
%        (e.g., f = '(s1.*s2).^2' or f = @(s1,s2) (s1.*s2).^2)
% opts - optional list of pairs of property names and values
%        dmtx - read images into data matrix X [default: false]
%__________________________________________________________________________
% Copyright (C) 2015-2016 Wellcome Trust Centre for Neuroimaging

% Guillaume Flandin
% $Id: spm_mesh_calc.m 6752 2016-03-24 16:17:25Z guillaume $


%-Check input arguments
%--------------------------------------------------------------------------
if ~isempty(Mo)
    Mo = spm_file(Mo,'ext','.gii');
    Mo = spm_file(Mo,'cpath');
end