Code covered by the BSD License  

Highlights from
Enhancing e-Infrastructures with Advanced Technical Computing: Parallel MATLAB® on the Grid

simulation
function data = simulation

% Load simbiology project
m1 =  loadSimBioModel;

% Performing stochastic runs

[t,x] = sbiosimulate(m1);           % Simulate the model
data = x(end,:);                    % Find state at last time point 

end



function m2=loadSimBioModel
% make m1 a persistent variable so that it does not
% need to be loaded each time
% load m1 in if it has not been loaded in yet

persistent m1 %#ok<USENS>

if isempty(m1)
sbioloadproject GeneRegulation m1 ;
m2 = m1;
% disp('loading')
else
m2 = m1;
% disp('already loaded')
end

end



Contact us at files@mathworks.com