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: mci_compare_gradients.m
    path of file: ./repos/spm/toolbox/mci/demo-gradients
    
    the code of the file until where you have to start completion: function [els,names] = mci_compare_gradients (model,cost,methods)
% Compare methods for gradient computation
% FORMAT [els,names] = mci_compare_gradients (model,cost,methods)
%

    
function [els,names] = mci_compare_gradients (model,cost,methods)
% Compare methods for gradient computation
% FORMAT [els,names] = mci_compare_gradients (model,cost,methods)
%
% model     'phase', 'nmm-r2p2'
% cost      'loglike', 'spm_mci_joint' (default)
% methods   vector of integers indicating which methods to
%           compare eg. [1,2,3,4,5] (default) for 1. SensMat, 
%           2. SensSun, 3. AdjMat, 4. AdjSun, 5. FD
%
% els       Computation times
% names     Names of compared methods
%
% Note: 4. AdjSun may not work for nmm2-r2p2.
%__________________________________________________________________________

% Will Penny
% Copyright (C) 2015 Wellcome Trust Centre for Neuroimaging


if nargin < 2 | isempty(cost)
    cost='spm_mci_joint';
end