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_immune_plot.m
    path of file: ./repos/spm/toolbox/DEM
    
    the code of the file until where you have to start completion: function y = spm_immune_plot(P,c,U,Y)
% Plotting for immune model
% FORMAT y = spm_immune_plot(P,c,M,U)
% P - Priors

    
function y = spm_immune_plot(P,c,U,Y)
% Plotting for immune model
% FORMAT y = spm_immune_plot(P,c,M,U)
% P - Priors
% c - covariance
% U - inputs (timing of measurements)
% Y - data
%__________________________________________________________________________
% Copyright (C) 2020 Wellcome Centre for Human Neuroimaging
 
% Thomas Parr
% Copyright (C) 2008-2022 Wellcome Centre for Human Neuroimaging


% Simulate model
%--------------------------------------------------------------------------
[y,X] = spm_immune_gen(P);

% Timing
%--------------------------------------------------------------------------
T = size(X{1},1);                               % Maximum time in hours
t = (1:T)/24;                                   % Converted to days

% Create covariance matrix
%--------------------------------------------------------------------------
c = diag(spm_vec(c));

% changes in outcomes with respect to parameters
%--------------------------------------------------------------------------
try, M.T = max(U)*24; catch, M.T = 1920;             end