# Generated Code

The following is matlab code generated by the CellML API from this CellML file. (Back to language selection)

The raw code is available.

```function [VOI, STATES, ALGEBRAIC, CONSTANTS] = mainFunction()
% This is the "main function".  In Matlab, things work best if you rename this function to match the filename.
[VOI, STATES, ALGEBRAIC, CONSTANTS] = solveModel();
end

function [algebraicVariableCount] = getAlgebraicVariableCount()
% Used later when setting a global variable with the number of algebraic variables.
% Note: This is not the "main method".
algebraicVariableCount =8;
end
% There are a total of 16 entries in each of the rate and state variable arrays.
% There are a total of 58 entries in the constant variable array.
%

function [VOI, STATES, ALGEBRAIC, CONSTANTS] = solveModel()
% Create ALGEBRAIC of correct size
global algebraicVariableCount;  algebraicVariableCount = getAlgebraicVariableCount();
% Initialise constants and state variables
[INIT_STATES, CONSTANTS] = initConsts;

% Set timespan to solve over
tspan = [0, 10];

% Set numerical accuracy options for ODE solver
options = odeset('RelTol', 1e-06, 'AbsTol', 1e-06, 'MaxStep', 1);

% Solve model with ODE solver
[VOI, STATES] = ode15s(@(VOI, STATES)computeRates(VOI, STATES, CONSTANTS), tspan, INIT_STATES, options);

% Compute algebraic variables
[RATES, ALGEBRAIC] = computeRates(VOI, STATES, CONSTANTS);
ALGEBRAIC = computeAlgebraic(ALGEBRAIC, CONSTANTS, STATES, VOI);

% Plot state variables against variable of integration
[LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends();
figure();
plot(VOI, STATES);
xlabel(LEGEND_VOI);
l = legend(LEGEND_STATES);
set(l,'Interpreter','none');
end

function [LEGEND_STATES, LEGEND_ALGEBRAIC, LEGEND_VOI, LEGEND_CONSTANTS] = createLegends()
LEGEND_STATES = ''; LEGEND_ALGEBRAIC = ''; LEGEND_VOI = ''; LEGEND_CONSTANTS = '';
LEGEND_VOI = strpad('time in component environment (minute)');
LEGEND_STATES(:,1) = strpad('MPF in component MPF (dimensionless)');
LEGEND_CONSTANTS(:,1) = strpad('k1 in component rate_constants (first_order_rate_constant)');
LEGEND_ALGEBRAIC(:,1) = strpad('k2 in component rate_constants (first_order_rate_constant)');
LEGEND_ALGEBRAIC(:,3) = strpad('kwee in component rate_constants (first_order_rate_constant)');
LEGEND_ALGEBRAIC(:,5) = strpad('kc25 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,2) = strpad('kj in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,3) = strpad('kjr in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,4) = strpad('k6_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,5) = strpad('k6 in component rate_constants (first_order_rate_constant)');
LEGEND_STATES(:,2) = strpad('mass in component mass (dimensionless)');
LEGEND_STATES(:,3) = strpad('preMPF in component preMPF (dimensionless)');
LEGEND_STATES(:,4) = strpad('Rum1 in component Rum1 (dimensionless)');
LEGEND_STATES(:,5) = strpad('Rum1P in component Rum1P (dimensionless)');
LEGEND_STATES(:,6) = strpad('CR in component CR (dimensionless)');
LEGEND_STATES(:,7) = strpad('CRP in component CRP (dimensionless)');
LEGEND_STATES(:,8) = strpad('Ste9 in component Ste9 (dimensionless)');
LEGEND_CONSTANTS(:,6) = strpad('kste9r_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,7) = strpad('kste9r in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,8) = strpad('kste9 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,9) = strpad('Jste9r in component Ste9 (dimensionless)');
LEGEND_CONSTANTS(:,10) = strpad('Jste9 in component Ste9 (dimensionless)');
LEGEND_ALGEBRAIC(:,2) = strpad('MPF_a in component MPF_a (dimensionless)');
LEGEND_ALGEBRAIC(:,4) = strpad('PP in component PP (dimensionless)');
LEGEND_CONSTANTS(:,11) = strpad('SK in component dimensionless_constants (dimensionless)');
LEGEND_STATES(:,9) = strpad('Mik1 in component Mik1 (dimensionless)');
LEGEND_CONSTANTS(:,12) = strpad('ks in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,13) = strpad('kmr_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,14) = strpad('kmr in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,15) = strpad('km in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,16) = strpad('Jmikr in component Mik1 (dimensionless)');
LEGEND_CONSTANTS(:,17) = strpad('Jmik in component Mik1 (dimensionless)');
LEGEND_STATES(:,10) = strpad('Wee1 in component Wee1 (dimensionless)');
LEGEND_CONSTANTS(:,18) = strpad('kwr_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,19) = strpad('kwr in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,20) = strpad('kw in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,21) = strpad('Jweer in component Wee1 (dimensionless)');
LEGEND_CONSTANTS(:,22) = strpad('Jwee in component Wee1 (dimensionless)');
LEGEND_STATES(:,11) = strpad('Cdc25 in component Cdc25 (dimensionless)');
LEGEND_CONSTANTS(:,23) = strpad('k25 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,24) = strpad('k5 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,25) = strpad('k25r_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,26) = strpad('k25r in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,27) = strpad('J25 in component Cdc25 (dimensionless)');
LEGEND_CONSTANTS(:,28) = strpad('J25r in component Cdc25 (dimensionless)');
LEGEND_STATES(:,12) = strpad('Slp1 in component Slp1 (dimensionless)');
LEGEND_CONSTANTS(:,29) = strpad('kas in component rate_constants (first_order_rate_constant)');
LEGEND_STATES(:,13) = strpad('Slp1_a in component Slp1_a (dimensionless)');
LEGEND_CONSTANTS(:,31) = strpad('kaa_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,32) = strpad('kaa in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,33) = strpad('kai in component rate_constants (first_order_rate_constant)');
LEGEND_STATES(:,14) = strpad('Inh in component Inh (dimensionless)');
LEGEND_CONSTANTS(:,34) = strpad('k3 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,35) = strpad('ki in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,36) = strpad('kir in component rate_constants (first_order_rate_constant)');
LEGEND_ALGEBRAIC(:,6) = strpad('k4 in component rate_constants (first_order_rate_constant)');
LEGEND_STATES(:,15) = strpad('PI in component PI (dimensionless)');
LEGEND_CONSTANTS(:,37) = strpad('kp in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,38) = strpad('kpp_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,39) = strpad('kpp in component rate_constants (first_order_rate_constant)');
LEGEND_ALGEBRAIC(:,7) = strpad('k2c in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,40) = strpad('epsilon_p in component dimensionless_constants (dimensionless)');
LEGEND_CONSTANTS(:,41) = strpad('mu in component mass (first_order_rate_constant)');
LEGEND_STATES(:,16) = strpad('R_dna in component R_dna (dimensionless)');
LEGEND_CONSTANTS(:,42) = strpad('K in component R_dna (dimensionless)');
LEGEND_CONSTANTS(:,43) = strpad('Y in component R_dna (dimensionless)');
LEGEND_CONSTANTS(:,44) = strpad('epsilon in component dimensionless_constants (dimensionless)');
LEGEND_ALGEBRAIC(:,8) = strpad('ratio in component ratio (dimensionless)');
LEGEND_CONSTANTS(:,45) = strpad('V2_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,46) = strpad('V2 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,47) = strpad('V2c in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,48) = strpad('V2c_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,49) = strpad('Vwee in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,50) = strpad('Vwee_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,51) = strpad('Vmik in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,52) = strpad('Vmik_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,53) = strpad('V25 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,54) = strpad('V25_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,55) = strpad('Vpyp in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,56) = strpad('V4 in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,57) = strpad('V4_ in component rate_constants (first_order_rate_constant)');
LEGEND_CONSTANTS(:,58) = strpad('Pyp3 in component rate_constants (dimensionless)');
LEGEND_RATES(:,1) = strpad('d/dt MPF in component MPF (dimensionless)');
LEGEND_RATES(:,3) = strpad('d/dt preMPF in component preMPF (dimensionless)');
LEGEND_RATES(:,8) = strpad('d/dt Ste9 in component Ste9 (dimensionless)');
LEGEND_RATES(:,9) = strpad('d/dt Mik1 in component Mik1 (dimensionless)');
LEGEND_RATES(:,10) = strpad('d/dt Wee1 in component Wee1 (dimensionless)');
LEGEND_RATES(:,11) = strpad('d/dt Cdc25 in component Cdc25 (dimensionless)');
LEGEND_RATES(:,12) = strpad('d/dt Slp1 in component Slp1 (dimensionless)');
LEGEND_RATES(:,13) = strpad('d/dt Slp1_a in component Slp1_a (dimensionless)');
LEGEND_RATES(:,14) = strpad('d/dt Inh in component Inh (dimensionless)');
LEGEND_RATES(:,15) = strpad('d/dt PI in component PI (dimensionless)');
LEGEND_RATES(:,7) = strpad('d/dt CRP in component CRP (dimensionless)');
LEGEND_RATES(:,6) = strpad('d/dt CR in component CR (dimensionless)');
LEGEND_RATES(:,4) = strpad('d/dt Rum1 in component Rum1 (dimensionless)');
LEGEND_RATES(:,5) = strpad('d/dt Rum1P in component Rum1P (dimensionless)');
LEGEND_RATES(:,2) = strpad('d/dt mass in component mass (dimensionless)');
LEGEND_RATES(:,16) = strpad('d/dt R_dna in component R_dna (dimensionless)');
LEGEND_STATES  = LEGEND_STATES';
LEGEND_ALGEBRAIC = LEGEND_ALGEBRAIC';
LEGEND_RATES = LEGEND_RATES';
LEGEND_CONSTANTS = LEGEND_CONSTANTS';
end

function [STATES, CONSTANTS] = initConsts()
VOI = 0; CONSTANTS = []; STATES = []; ALGEBRAIC = [];
STATES(:,1) = 0;
CONSTANTS(:,1) = 0.02;
CONSTANTS(:,2) = 400;
CONSTANTS(:,3) = 1;
CONSTANTS(:,4) = 0.1;
CONSTANTS(:,5) = 5;
STATES(:,2) = 1;
STATES(:,3) = 1;
STATES(:,4) = 0;
STATES(:,5) = 0;
STATES(:,6) = 0;
STATES(:,7) = 0;
STATES(:,8) = 0;
CONSTANTS(:,6) = 0.03;
CONSTANTS(:,7) = 8;
CONSTANTS(:,8) = 5;
CONSTANTS(:,9) = 0.01;
CONSTANTS(:,10) = 0.01;
CONSTANTS(:,11) = 0.018;
STATES(:,9) = 0;
CONSTANTS(:,12) = 0.1;
CONSTANTS(:,13) = 0.01;
CONSTANTS(:,14) = 5;
CONSTANTS(:,15) = 1;
CONSTANTS(:,16) = 0.15;
CONSTANTS(:,17) = 0.15;
STATES(:,10) = 0;
CONSTANTS(:,18) = 0.4;
CONSTANTS(:,19) = 1;
CONSTANTS(:,20) = 2;
CONSTANTS(:,21) = 0.2;
CONSTANTS(:,22) = 0.2;
STATES(:,11) = 0;
CONSTANTS(:,23) = 1;
CONSTANTS(:,24) = 0.1;
CONSTANTS(:,25) = 0.4;
CONSTANTS(:,26) = 2;
CONSTANTS(:,27) = 0.05;
CONSTANTS(:,28) = 0.05;
STATES(:,12) = 0;
CONSTANTS(:,29) = 0.1;
CONSTANTS(:,30) = 0.1;
STATES(:,13) = 0;
CONSTANTS(:,31) = 0.01;
CONSTANTS(:,32) = 0.1;
CONSTANTS(:,33) = 0.1;
STATES(:,14) = 0;
CONSTANTS(:,34) = 0.1;
CONSTANTS(:,35) = 50;
CONSTANTS(:,36) = 0.5;
STATES(:,15) = 0.2;
CONSTANTS(:,37) = 100;
CONSTANTS(:,38) = 1;
CONSTANTS(:,39) = 100;
CONSTANTS(:,40) = 0.025;
CONSTANTS(:,41) = 0.00462;
STATES(:,16) = 1;
CONSTANTS(:,42) = 0.06;
CONSTANTS(:,43) = 0;
CONSTANTS(:,44) = 0.05;
CONSTANTS(:,45) = 0.02;
CONSTANTS(:,46) = 1;
CONSTANTS(:,47) = 0.5;
CONSTANTS(:,48) = 0.02;
CONSTANTS(:,49) = 10;
CONSTANTS(:,50) = 0.08;
CONSTANTS(:,51) = 2;
CONSTANTS(:,52) = 0.04;
CONSTANTS(:,53) = 10;
CONSTANTS(:,54) = 0.05;
CONSTANTS(:,55) = 0.07;
CONSTANTS(:,56) = 1;
CONSTANTS(:,57) = 0.01;
CONSTANTS(:,58) = 1;
if (isempty(STATES)), warning('Initial values for states not set');, end
end

function [RATES, ALGEBRAIC] = computeRates(VOI, STATES, CONSTANTS)
global algebraicVariableCount;
statesSize = size(STATES);
statesColumnCount = statesSize(2);
if ( statesColumnCount == 1)
STATES = STATES';
ALGEBRAIC = zeros(1, algebraicVariableCount);
utilOnes = 1;
else
statesRowCount = statesSize(1);
ALGEBRAIC = zeros(statesRowCount, algebraicVariableCount);
RATES = zeros(statesRowCount, statesColumnCount);
utilOnes = ones(statesRowCount, 1);
end
RATES(:,2) =  CONSTANTS(:,41).*STATES(:,2);
ALGEBRAIC(:,2) = STATES(:,1)+ CONSTANTS(:,44).*STATES(:,3);
RATES(:,12) =  CONSTANTS(:,29).*ALGEBRAIC(:,2) -  CONSTANTS(:,30).*STATES(:,12);
RATES(:,13) =  (CONSTANTS(:,31)+ CONSTANTS(:,32).*ALGEBRAIC(:,2)).*(STATES(:,12) - STATES(:,13)) -  (CONSTANTS(:,33)+CONSTANTS(:,30)).*STATES(:,13);
RATES(:,16) = ( CONSTANTS(:,42).*1.00000)./(1.00000+ CONSTANTS(:,43).*ALGEBRAIC(:,2));
ALGEBRAIC(:,4) = 1.00000 - STATES(:,15);
RATES(:,8) = ( (CONSTANTS(:,6)+ CONSTANTS(:,7).*ALGEBRAIC(:,4)).*(1.00000 - STATES(:,8)))./((CONSTANTS(:,9)+1.00000) - STATES(:,8)) - ( CONSTANTS(:,8).*(ALGEBRAIC(:,2)+ CONSTANTS(:,11).*STATES(:,2)).*STATES(:,8))./(CONSTANTS(:,10)+STATES(:,8));
RATES(:,9) = ( (CONSTANTS(:,12)+CONSTANTS(:,13)+ CONSTANTS(:,14).*ALGEBRAIC(:,4)).*(1.00000 - STATES(:,9)))./((CONSTANTS(:,16)+1.00000) - STATES(:,9)) - ( CONSTANTS(:,15).*ALGEBRAIC(:,2).*STATES(:,9))./(CONSTANTS(:,17)+STATES(:,9));
RATES(:,10) = ( (CONSTANTS(:,18)+ CONSTANTS(:,19).*ALGEBRAIC(:,4)).*(1.00000 - STATES(:,10)))./((CONSTANTS(:,21)+1.00000) - STATES(:,10)) - ( CONSTANTS(:,20).*ALGEBRAIC(:,2).*STATES(:,10))./(CONSTANTS(:,22)+STATES(:,10));
RATES(:,11) = ( CONSTANTS(:,23).*ALGEBRAIC(:,2).*(1.00000 - STATES(:,11)))./((CONSTANTS(:,27)+1.00000) - STATES(:,11)) - ( (CONSTANTS(:,24)+CONSTANTS(:,25)+ CONSTANTS(:,26).*ALGEBRAIC(:,4)).*STATES(:,11))./(CONSTANTS(:,28)+STATES(:,11));
ALGEBRAIC(:,1) = CONSTANTS(:,45)+ CONSTANTS(:,46).*STATES(:,8);
ALGEBRAIC(:,3) =  CONSTANTS(:,49).*STATES(:,10)+ CONSTANTS(:,50).*(1.00000 - STATES(:,10))+ CONSTANTS(:,51).*STATES(:,9)+ CONSTANTS(:,52).*(1.00000 - STATES(:,9));
ALGEBRAIC(:,5) =  CONSTANTS(:,53).*STATES(:,11)+ CONSTANTS(:,54).*(1.00000 - STATES(:,11))+ CONSTANTS(:,55).*CONSTANTS(:,58);
RATES(:,1) = (((( CONSTANTS(:,1).*STATES(:,2) -  ALGEBRAIC(:,1).*STATES(:,1)) -  ALGEBRAIC(:,3).*STATES(:,1))+ ALGEBRAIC(:,5).*STATES(:,3)) -  CONSTANTS(:,2).*STATES(:,1).*(STATES(:,4)+STATES(:,5)))+ CONSTANTS(:,3).*(STATES(:,6)+STATES(:,7))+ CONSTANTS(:,4).*STATES(:,6)+ (CONSTANTS(:,4)+CONSTANTS(:,5)).*STATES(:,7);
RATES(:,3) = ( ALGEBRAIC(:,3).*STATES(:,1) -  ALGEBRAIC(:,5).*STATES(:,3)) -  ALGEBRAIC(:,1).*STATES(:,3);
ALGEBRAIC(:,6) = CONSTANTS(:,57)+ CONSTANTS(:,56).*STATES(:,13);
RATES(:,14) = ((CONSTANTS(:,34) -  CONSTANTS(:,35).*STATES(:,14).*ALGEBRAIC(:,4))+ CONSTANTS(:,36).*STATES(:,15)) -  ALGEBRAIC(:,6).*STATES(:,14);
RATES(:,15) = ( CONSTANTS(:,35).*STATES(:,14).*ALGEBRAIC(:,4) -  CONSTANTS(:,36).*STATES(:,15)) -  ALGEBRAIC(:,6).*STATES(:,15);
ALGEBRAIC(:,7) = CONSTANTS(:,48)+ CONSTANTS(:,47).*STATES(:,8);
RATES(:,7) = (((( CONSTANTS(:,37).*(ALGEBRAIC(:,2)+ CONSTANTS(:,40).*CONSTANTS(:,11).*STATES(:,2)).*STATES(:,6) -  (CONSTANTS(:,38)+ CONSTANTS(:,39).*ALGEBRAIC(:,4)).*STATES(:,7))+ CONSTANTS(:,2).*STATES(:,1).*STATES(:,5)) -  CONSTANTS(:,3).*STATES(:,7)) -  ALGEBRAIC(:,7).*STATES(:,7)) -  (CONSTANTS(:,4)+CONSTANTS(:,5)).*STATES(:,7);
RATES(:,6) = (((( CONSTANTS(:,2).*STATES(:,1).*STATES(:,4) -  CONSTANTS(:,3).*STATES(:,6)) -  ALGEBRAIC(:,7).*STATES(:,6)) -  CONSTANTS(:,4).*STATES(:,6)) -  CONSTANTS(:,37).*(ALGEBRAIC(:,2)+ CONSTANTS(:,40).*CONSTANTS(:,11).*STATES(:,2)).*STATES(:,6))+ (CONSTANTS(:,38)+ CONSTANTS(:,39).*ALGEBRAIC(:,4)).*STATES(:,7);
RATES(:,4) = ((((CONSTANTS(:,24) -  CONSTANTS(:,4).*STATES(:,4)) -  CONSTANTS(:,37).*(ALGEBRAIC(:,2)+ CONSTANTS(:,40).*CONSTANTS(:,11).*STATES(:,2)).*STATES(:,4))+ (CONSTANTS(:,38)+ CONSTANTS(:,39).*ALGEBRAIC(:,4)).*STATES(:,5)) -  CONSTANTS(:,2).*STATES(:,1).*STATES(:,4))+ CONSTANTS(:,3).*STATES(:,6)+ ALGEBRAIC(:,7).*STATES(:,6);
RATES(:,5) = ((( CONSTANTS(:,37).*(ALGEBRAIC(:,2)+ CONSTANTS(:,40).*CONSTANTS(:,11).*STATES(:,2)).*STATES(:,4) -  (CONSTANTS(:,38)+ CONSTANTS(:,39).*ALGEBRAIC(:,4)).*STATES(:,5)) -  (CONSTANTS(:,4)+CONSTANTS(:,5)).*STATES(:,5)) -  CONSTANTS(:,2).*STATES(:,1).*STATES(:,5))+ CONSTANTS(:,3).*STATES(:,7)+ ALGEBRAIC(:,7).*STATES(:,7);
RATES = RATES';
end

% Calculate algebraic variables
function ALGEBRAIC = computeAlgebraic(ALGEBRAIC, CONSTANTS, STATES, VOI)
statesSize = size(STATES);
statesColumnCount = statesSize(2);
if ( statesColumnCount == 1)
STATES = STATES';
utilOnes = 1;
else
statesRowCount = statesSize(1);
utilOnes = ones(statesRowCount, 1);
end
ALGEBRAIC(:,2) = STATES(:,1)+ CONSTANTS(:,44).*STATES(:,3);
ALGEBRAIC(:,4) = 1.00000 - STATES(:,15);
ALGEBRAIC(:,1) = CONSTANTS(:,45)+ CONSTANTS(:,46).*STATES(:,8);
ALGEBRAIC(:,3) =  CONSTANTS(:,49).*STATES(:,10)+ CONSTANTS(:,50).*(1.00000 - STATES(:,10))+ CONSTANTS(:,51).*STATES(:,9)+ CONSTANTS(:,52).*(1.00000 - STATES(:,9));
ALGEBRAIC(:,5) =  CONSTANTS(:,53).*STATES(:,11)+ CONSTANTS(:,54).*(1.00000 - STATES(:,11))+ CONSTANTS(:,55).*CONSTANTS(:,58);
ALGEBRAIC(:,6) = CONSTANTS(:,57)+ CONSTANTS(:,56).*STATES(:,13);
ALGEBRAIC(:,7) = CONSTANTS(:,48)+ CONSTANTS(:,47).*STATES(:,8);
ALGEBRAIC(:,8) = ALGEBRAIC(:,2)./ALGEBRAIC(:,4);
end

% Pad out or shorten strings to a set length
req_length = 160;
insize = size(strin,2);
if insize > req_length
strout = strin(1:req_length);
else
strout = [strin, blanks(req_length - insize)];
end
end

```
Source
Derived from workspace Sveiczer, Csikasznagy, Gyorffy, Tyson, Novak, 2000 at changeset a97ee8692690.
Collaboration
To begin collaborating on this work, please use your git client and issue this command: