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 =43;
end
% There are a total of 7 entries in each of the rate and state variable arrays.
% There are a total of 35 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 (second)');
    LEGEND_CONSTANTS(:,1) = strpad('k0_12 in component parameters (per_M_per_second)');
    LEGEND_CONSTANTS(:,2) = strpad('k0_21 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,3) = strpad('k0_23 in component parameters (per_M_per_second)');
    LEGEND_CONSTANTS(:,4) = strpad('k0_32 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,5) = strpad('k0_34 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,6) = strpad('k0_43 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,7) = strpad('k0_45 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,8) = strpad('k0_54 in component parameters (per_M_per_second)');
    LEGEND_CONSTANTS(:,9) = strpad('k0_25 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,10) = strpad('k0_52 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,11) = strpad('k0_56 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,12) = strpad('k0_65 in component parameters (per_M_per_second)');
    LEGEND_CONSTANTS(:,13) = strpad('k0_61 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,14) = strpad('k0_16 in component parameters (per_second)');
    LEGEND_CONSTANTS(:,15) = strpad('delta in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,30) = strpad('alpha_p in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,16) = strpad('alpha_pp in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,17) = strpad('N_C in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,18) = strpad('N_Avo in component parameters (per_mol)');
    LEGEND_CONSTANTS(:,19) = strpad('area in component parameters (um2)');
    LEGEND_CONSTANTS(:,31) = strpad('C_T in component parameters (umol)');
    LEGEND_CONSTANTS(:,20) = strpad('n in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,21) = strpad('z_c in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,22) = strpad('z_Na in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,23) = strpad('F in component parameters (C_per_mol)');
    LEGEND_CONSTANTS(:,24) = strpad('R in component parameters (J_per_K_per_mol)');
    LEGEND_CONSTANTS(:,25) = strpad('T in component parameters (kelvin)');
    LEGEND_STATES(:,1) = strpad('V in component ion_concentrations (volt)');
    LEGEND_ALGEBRAIC(:,1) = strpad('mu in component parameters (dimensionless)');
    LEGEND_CONSTANTS(:,26) = strpad('Na_i in component ion_concentrations (M)');
    LEGEND_CONSTANTS(:,27) = strpad('Na_o in component ion_concentrations (M)');
    LEGEND_CONSTANTS(:,28) = strpad('glucose_i in component ion_concentrations (M)');
    LEGEND_CONSTANTS(:,29) = strpad('glucose_o in component ion_concentrations (M)');
    LEGEND_ALGEBRAIC(:,4) = strpad('k_12 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,5) = strpad('k_21 in component rate_constants (per_second)');
    LEGEND_CONSTANTS(:,32) = strpad('k_23 in component rate_constants (per_second)');
    LEGEND_CONSTANTS(:,33) = strpad('k_32 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,6) = strpad('k_34 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,7) = strpad('k_43 in component rate_constants (per_second)');
    LEGEND_CONSTANTS(:,34) = strpad('k_45 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,15) = strpad('k_54 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,8) = strpad('k_25 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,13) = strpad('k_52 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,9) = strpad('k_56 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,10) = strpad('k_65 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,11) = strpad('k_61 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,12) = strpad('k_16 in component rate_constants (per_second)');
    LEGEND_ALGEBRAIC(:,2) = strpad('ks_12 in component rate_constants (per_M_per_second)');
    LEGEND_ALGEBRAIC(:,14) = strpad('k0_54_temp in component rate_constants (per_M_per_second)');
    LEGEND_ALGEBRAIC(:,3) = strpad('k_52_temp in component rate_constants (per_second)');
    LEGEND_STATES(:,2) = strpad('C_1 in component kinetic_equations (umol)');
    LEGEND_STATES(:,3) = strpad('C_2 in component kinetic_equations (umol)');
    LEGEND_STATES(:,4) = strpad('C_3 in component kinetic_equations (umol)');
    LEGEND_STATES(:,5) = strpad('C_4 in component kinetic_equations (umol)');
    LEGEND_STATES(:,6) = strpad('C_5 in component kinetic_equations (umol)');
    LEGEND_ALGEBRAIC(:,16) = strpad('C_6 in component kinetic_equations (umol)');
    LEGEND_STATES(:,7) = strpad('C_6_temp in component kinetic_equations (umol)');
    LEGEND_ALGEBRAIC(:,17) = strpad('C1_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,19) = strpad('C2_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,23) = strpad('C3_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,25) = strpad('C4_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,28) = strpad('C5_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,32) = strpad('C6_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,35) = strpad('C_sum in component king_altman_states (per_second5)');
    LEGEND_ALGEBRAIC(:,36) = strpad('C1 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,37) = strpad('C2 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,38) = strpad('C3 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,39) = strpad('C4 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,40) = strpad('C5 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,41) = strpad('C6 in component king_altman_states (umol)');
    LEGEND_ALGEBRAIC(:,20) = strpad('I_NaGl_pSS in component NBC_current (uA)');
    LEGEND_ALGEBRAIC(:,43) = strpad('I_NaGl_SS in component NBC_current (uA)');
    LEGEND_ALGEBRAIC(:,42) = strpad('J_Na in component NBC_current (umol_per_second)');
    LEGEND_ALGEBRAIC(:,29) = strpad('epsilon in component phenomonological_constants (per_second)');
    LEGEND_ALGEBRAIC(:,18) = strpad('lambda in component phenomonological_constants (per_M2_per_second5)');
    LEGEND_ALGEBRAIC(:,21) = strpad('chi in component phenomonological_constants (M)');
    LEGEND_ALGEBRAIC(:,27) = strpad('alpha in component phenomonological_constants (M2)');
    LEGEND_ALGEBRAIC(:,24) = strpad('beta in component phenomonological_constants (M)');
    LEGEND_ALGEBRAIC(:,22) = strpad('gamma in component phenomonological_constants (M2_per_second)');
    LEGEND_ALGEBRAIC(:,26) = strpad('phi in component phenomonological_constants (M_per_second)');
    LEGEND_ALGEBRAIC(:,33) = strpad('Imax_Na in component phenomonological_constants (uA)');
    LEGEND_ALGEBRAIC(:,34) = strpad('Imax_gluc in component phenomonological_constants (uA)');
    LEGEND_ALGEBRAIC(:,30) = strpad('Khalf_Na in component phenomonological_constants (M)');
    LEGEND_ALGEBRAIC(:,31) = strpad('Khalf_gluc in component phenomonological_constants (M)');
    LEGEND_RATES(:,1) = strpad('d/dt V in component ion_concentrations (volt)');
    LEGEND_RATES(:,2) = strpad('d/dt C_1 in component kinetic_equations (umol)');
    LEGEND_RATES(:,3) = strpad('d/dt C_2 in component kinetic_equations (umol)');
    LEGEND_RATES(:,4) = strpad('d/dt C_3 in component kinetic_equations (umol)');
    LEGEND_RATES(:,5) = strpad('d/dt C_4 in component kinetic_equations (umol)');
    LEGEND_RATES(:,6) = strpad('d/dt C_5 in component kinetic_equations (umol)');
    LEGEND_RATES(:,7) = strpad('d/dt C_6_temp in component kinetic_equations (umol)');
    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 = [];
    CONSTANTS(:,1) = 20000;
    CONSTANTS(:,2) = 400;
    CONSTANTS(:,3) = 1e4;
    CONSTANTS(:,4) = 20;
    CONSTANTS(:,5) = 50;
    CONSTANTS(:,6) = 50;
    CONSTANTS(:,7) = 800;
    CONSTANTS(:,8) = 6.7e6;
    CONSTANTS(:,9) = 0.01;
    CONSTANTS(:,10) = 0.17;
    CONSTANTS(:,11) = 48;
    CONSTANTS(:,12) = 50;
    CONSTANTS(:,13) = 35;
    CONSTANTS(:,14) = 100;
    CONSTANTS(:,15) = 0.7;
    CONSTANTS(:,16) = 0;
    CONSTANTS(:,17) = 8.4e10;
    CONSTANTS(:,18) = 6.022e23;
    CONSTANTS(:,19) = 1e6;
    CONSTANTS(:,20) = 1;
    CONSTANTS(:,21) = -1;
    CONSTANTS(:,22) = 1;
    CONSTANTS(:,23) = 96485.34;
    CONSTANTS(:,24) = 8.314;
    CONSTANTS(:,25) = 310;
    STATES(:,1) = -150e-3;
    CONSTANTS(:,26) = 10e-3;
    CONSTANTS(:,27) = 100e-3;
    CONSTANTS(:,28) = 0e-3;
    CONSTANTS(:,29) = 1e-3;
    STATES(:,2) = 3.923e-9;
    STATES(:,3) = 1.016e-7;
    STATES(:,4) = 1.515e-8;
    STATES(:,5) = 8.912e-10;
    STATES(:,6) = 1.485e-8;
    STATES(:,7) = 3.06798e-9;
    CONSTANTS(:,30) = (1.00000 - CONSTANTS(:,15)) - CONSTANTS(:,16);
    CONSTANTS(:,34) = 0.000100000;
    CONSTANTS(:,31) = ( 1.00000e+06.*CONSTANTS(:,17))./CONSTANTS(:,18);
    CONSTANTS(:,32) =  CONSTANTS(:,3).*CONSTANTS(:,29);
    CONSTANTS(:,33) = CONSTANTS(:,4);
    CONSTANTS(:,34) = CONSTANTS(:,7);
    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(:,1) = CONSTANTS(:,34);
    ALGEBRAIC(:,1) = ( CONSTANTS(:,23).*STATES(:,1))./( CONSTANTS(:,24).*CONSTANTS(:,25));
    ALGEBRAIC(:,6) =  CONSTANTS(:,5).*exp((  - (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,7) =  CONSTANTS(:,6).*exp(( (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    RATES(:,4) = ( CONSTANTS(:,32).*STATES(:,3)+ ALGEBRAIC(:,7).*STATES(:,5)) -  (CONSTANTS(:,33)+ALGEBRAIC(:,6)).*STATES(:,4);
    ALGEBRAIC(:,9) =  CONSTANTS(:,11).*exp((  - CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,16).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,10) =  CONSTANTS(:,12).*power(CONSTANTS(:,26), CONSTANTS(:,20)).*exp(( CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,16).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,11) =  CONSTANTS(:,13).*exp(( CONSTANTS(:,21).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,12) =  CONSTANTS(:,14).*exp((  - CONSTANTS(:,21).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    RATES(:,7) = ( ALGEBRAIC(:,12).*STATES(:,2)+ ALGEBRAIC(:,9).*STATES(:,6)) -  (ALGEBRAIC(:,11)+ALGEBRAIC(:,10)).*STATES(:,7);
    ALGEBRAIC(:,2) =  CONSTANTS(:,1).*exp((  - CONSTANTS(:,20).*CONSTANTS(:,30).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,4) =  ALGEBRAIC(:,2).*power(CONSTANTS(:,27), CONSTANTS(:,20));
    ALGEBRAIC(:,5) =  CONSTANTS(:,2).*exp(( CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,30).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,8) =  CONSTANTS(:,9).*exp((  - (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,13) = ( CONSTANTS(:,1).*ALGEBRAIC(:,8).*CONSTANTS(:,11).*CONSTANTS(:,13))./( CONSTANTS(:,2).*CONSTANTS(:,14).*CONSTANTS(:,12));
    RATES(:,3) = ( ALGEBRAIC(:,4).*STATES(:,2)+ CONSTANTS(:,33).*STATES(:,4)+ ALGEBRAIC(:,13).*STATES(:,6)) -  (ALGEBRAIC(:,5)+CONSTANTS(:,32)+ALGEBRAIC(:,8)).*STATES(:,3);
    ALGEBRAIC(:,14) = ( CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13))./( ALGEBRAIC(:,7).*CONSTANTS(:,33).*ALGEBRAIC(:,8));
    ALGEBRAIC(:,15) =  ALGEBRAIC(:,14).*CONSTANTS(:,28);
    RATES(:,5) = ( ALGEBRAIC(:,6).*STATES(:,4)+ ALGEBRAIC(:,15).*STATES(:,6)) -  (CONSTANTS(:,34)+ALGEBRAIC(:,7)).*STATES(:,5);
    ALGEBRAIC(:,16) = CONSTANTS(:,31) - (STATES(:,2)+STATES(:,3)+STATES(:,4)+STATES(:,5)+STATES(:,6));
    RATES(:,2) = ( ALGEBRAIC(:,5).*STATES(:,3)+ ALGEBRAIC(:,11).*ALGEBRAIC(:,16)) -  (ALGEBRAIC(:,4)+ALGEBRAIC(:,12)).*STATES(:,2);
    RATES(:,6) = ( CONSTANTS(:,34).*STATES(:,5)+ ALGEBRAIC(:,10).*ALGEBRAIC(:,16)+ ALGEBRAIC(:,8).*STATES(:,3)) -  (ALGEBRAIC(:,15)+ALGEBRAIC(:,13)+ALGEBRAIC(:,9)).*STATES(:,6);
   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(:,1) = ( CONSTANTS(:,23).*STATES(:,1))./( CONSTANTS(:,24).*CONSTANTS(:,25));
    ALGEBRAIC(:,6) =  CONSTANTS(:,5).*exp((  - (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,7) =  CONSTANTS(:,6).*exp(( (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,9) =  CONSTANTS(:,11).*exp((  - CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,16).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,10) =  CONSTANTS(:,12).*power(CONSTANTS(:,26), CONSTANTS(:,20)).*exp(( CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,16).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,11) =  CONSTANTS(:,13).*exp(( CONSTANTS(:,21).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,12) =  CONSTANTS(:,14).*exp((  - CONSTANTS(:,21).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,2) =  CONSTANTS(:,1).*exp((  - CONSTANTS(:,20).*CONSTANTS(:,30).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,4) =  ALGEBRAIC(:,2).*power(CONSTANTS(:,27), CONSTANTS(:,20));
    ALGEBRAIC(:,5) =  CONSTANTS(:,2).*exp(( CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,30).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,8) =  CONSTANTS(:,9).*exp((  - (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,13) = ( CONSTANTS(:,1).*ALGEBRAIC(:,8).*CONSTANTS(:,11).*CONSTANTS(:,13))./( CONSTANTS(:,2).*CONSTANTS(:,14).*CONSTANTS(:,12));
    ALGEBRAIC(:,14) = ( CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13))./( ALGEBRAIC(:,7).*CONSTANTS(:,33).*ALGEBRAIC(:,8));
    ALGEBRAIC(:,15) =  ALGEBRAIC(:,14).*CONSTANTS(:,28);
    ALGEBRAIC(:,16) = CONSTANTS(:,31) - (STATES(:,2)+STATES(:,3)+STATES(:,4)+STATES(:,5)+STATES(:,6));
    ALGEBRAIC(:,3) =  CONSTANTS(:,10).*exp(( (CONSTANTS(:,21)+CONSTANTS(:,20)).*CONSTANTS(:,15).*ALGEBRAIC(:,1))./2.00000);
    ALGEBRAIC(:,17) =  ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,18) =  ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9);
    ALGEBRAIC(:,19) =  ALGEBRAIC(:,12).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,20) =   - CONSTANTS(:,23).*( CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,30).*( ALGEBRAIC(:,4).*STATES(:,2) -  ALGEBRAIC(:,5).*STATES(:,3))+ CONSTANTS(:,21).*CONSTANTS(:,15).*( ALGEBRAIC(:,12).*STATES(:,2) -  ALGEBRAIC(:,11).*ALGEBRAIC(:,16))+ CONSTANTS(:,20).*CONSTANTS(:,22).*CONSTANTS(:,16).*( ALGEBRAIC(:,9).*STATES(:,6) -  ALGEBRAIC(:,10).*ALGEBRAIC(:,16)));
    ALGEBRAIC(:,21) =  (1.00000./ALGEBRAIC(:,18)).*( ALGEBRAIC(:,2).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9));
    ALGEBRAIC(:,22) =  (1.00000./ALGEBRAIC(:,18)).*( ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10));
    ALGEBRAIC(:,23) =  ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,24) =  (1.00000./ALGEBRAIC(:,18)).*( CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ CONSTANTS(:,3).*ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9));
    ALGEBRAIC(:,25) =  ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,26) =  (1.00000./ALGEBRAIC(:,18)).*((  - ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11) -  ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)) -  ALGEBRAIC(:,2).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11));
    ALGEBRAIC(:,27) =  (1.00000./ALGEBRAIC(:,18)).*( ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,15).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13));
    ALGEBRAIC(:,28) =  ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,10)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,11)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,29) =  (1.00000./ALGEBRAIC(:,18)).* - ALGEBRAIC(:,2).*CONSTANTS(:,3).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9).*ALGEBRAIC(:,11);
    ALGEBRAIC(:,30) = (ALGEBRAIC(:,27)+ ALGEBRAIC(:,24).*CONSTANTS(:,29))./(ALGEBRAIC(:,21)+CONSTANTS(:,29));
    ALGEBRAIC(:,31) = (ALGEBRAIC(:,27)+ ALGEBRAIC(:,21).*CONSTANTS(:,27))./(ALGEBRAIC(:,24)+CONSTANTS(:,27));
    ALGEBRAIC(:,32) =  ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,4).*CONSTANTS(:,32).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,4).*ALGEBRAIC(:,8).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,9)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,15)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*ALGEBRAIC(:,6).*CONSTANTS(:,34).*ALGEBRAIC(:,13)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*CONSTANTS(:,34).*ALGEBRAIC(:,13)+ ALGEBRAIC(:,12).*ALGEBRAIC(:,5).*CONSTANTS(:,33).*ALGEBRAIC(:,7).*ALGEBRAIC(:,13);
    ALGEBRAIC(:,33) = ( 2.00000.*CONSTANTS(:,23).*CONSTANTS(:,31).*(ALGEBRAIC(:,26)+ ALGEBRAIC(:,29).*CONSTANTS(:,29)))./(ALGEBRAIC(:,21)+CONSTANTS(:,29));
    ALGEBRAIC(:,34) = ( 2.00000.*CONSTANTS(:,23).*CONSTANTS(:,31).*ALGEBRAIC(:,29).*CONSTANTS(:,27))./(ALGEBRAIC(:,24)+CONSTANTS(:,27));
    ALGEBRAIC(:,35) = ALGEBRAIC(:,17)+ALGEBRAIC(:,19)+ALGEBRAIC(:,23)+ALGEBRAIC(:,25)+ALGEBRAIC(:,28)+ALGEBRAIC(:,32);
    ALGEBRAIC(:,36) = ( CONSTANTS(:,31).*ALGEBRAIC(:,17))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,37) = ( CONSTANTS(:,31).*ALGEBRAIC(:,19))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,38) = ( CONSTANTS(:,31).*ALGEBRAIC(:,23))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,39) = ( CONSTANTS(:,31).*ALGEBRAIC(:,25))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,40) = ( CONSTANTS(:,31).*ALGEBRAIC(:,28))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,41) = ( CONSTANTS(:,31).*ALGEBRAIC(:,32))./ALGEBRAIC(:,35);
    ALGEBRAIC(:,42) = ( ALGEBRAIC(:,8).*ALGEBRAIC(:,37) -  ALGEBRAIC(:,13).*ALGEBRAIC(:,40))+( ALGEBRAIC(:,6).*ALGEBRAIC(:,38) -  ALGEBRAIC(:,7).*ALGEBRAIC(:,39));
    ALGEBRAIC(:,43) =   - CONSTANTS(:,23).*( CONSTANTS(:,21).*( ALGEBRAIC(:,12).*ALGEBRAIC(:,36) -  ALGEBRAIC(:,11).*ALGEBRAIC(:,41))+ (CONSTANTS(:,21)+ CONSTANTS(:,22).*CONSTANTS(:,20)).*( ALGEBRAIC(:,8).*ALGEBRAIC(:,37) -  ALGEBRAIC(:,13).*ALGEBRAIC(:,40))+ (CONSTANTS(:,21)+ CONSTANTS(:,22).*CONSTANTS(:,20)).*( ALGEBRAIC(:,6).*ALGEBRAIC(:,38) -  ALGEBRAIC(:,7).*ALGEBRAIC(:,39)));
end

% Pad out or shorten strings to a set length
function strout = strpad(strin)
    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