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_mci_glike_deriv.m
    path of file: ./repos/spm12/toolbox/mci/inference
    
    the code of the file until where you have to start completion: function [dLdp,iCpY,st,L] = spm_mci_glike_deriv (P,M,U,Y)
% Gradient of Gaussian Log-likelihood 
% FORMAT [dLdp,iCpY,st,L] = spm_mci_glike_deriv (P,M,U,Y)
%
% P         Parameters
% M         Model structure
% U         Inputs
% Y         Data
% 
% dLdP      Gradient of Log Likelihood wrt params, [1 x Np]

    
function [dLdp,iCpY,st,L] = spm_mci_glike_deriv (P,M,U,Y)
% Gradient of Gaussian Log-likelihood 
% FORMAT [dLdp,iCpY,st,L] = spm_mci_glike_deriv (P,M,U,Y)
%
% P         Parameters
% M         Model structure
% U         Inputs
% Y         Data
% 
% dLdP      Gradient of Log Likelihood wrt params, [1 x Np]
% iCpY      Curvature (Fisher Information)
% st        status flag (0 for OK, -1 for problem)
% L         Log Likelihood
%__________________________________________________________________________
% Copyright (C) 2015 Wellcome Trust Centre for Neuroimaging

% Will Penny and Biswa Sengupta
% $Id: spm_mci_glike_deriv.m 6548 2015-09-11 12:39:47Z will $

%[G,x,S] = spm_mci_fwd (P,M,U,1);
if strcmp(M.int,'sundials')
    [G,S,st] = spm_mci_sens_sun (P,M,U);
else
    [G,S,st] = spm_mci_sens (P,M,U);
end