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 4 entries in each of the rate and state variable arrays. % There are a total of 566 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_CONSTANTS(:,1) = strpad('AMK in component input_values (dimensionless)'); LEGEND_CONSTANTS(:,2) = strpad('TVD in component input_values (L_per_minute)'); LEGEND_CONSTANTS(:,3) = strpad('STH in component input_values (dimensionless)'); LEGEND_CONSTANTS(:,4) = strpad('NOD in component input_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,5) = strpad('KOD in component input_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,6) = strpad('VUD in component input_values (L_per_minute)'); LEGEND_CONSTANTS(:,7) = strpad('A1K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,8) = strpad('A2K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,9) = strpad('A3K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,10) = strpad('A4K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,11) = strpad('A4K2 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,12) = strpad('AARK in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,13) = strpad('AARLL in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,14) = strpad('ADHINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,15) = strpad('ADHKLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,16) = strpad('ADHKUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,17) = strpad('ADHPAM in component parameter_values (per_mmHg2)'); LEGEND_CONSTANTS(:,18) = strpad('ADHPUL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,19) = strpad('ADHTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,20) = strpad('ADHVLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,21) = strpad('ADHVUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,22) = strpad('AH10 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,23) = strpad('AH11 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,24) = strpad('AH9 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,25) = strpad('AHMNAR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,26) = strpad('AHTHM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,27) = strpad('ALCLK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,28) = strpad('ALDINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,29) = strpad('ALDKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,30) = strpad('ALDMM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,31) = strpad('AM1LL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,32) = strpad('AM1UL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,33) = strpad('AMCSNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,34) = strpad('AMKM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,35) = strpad('AMKMUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,36) = strpad('AMM1LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,37) = strpad('AMM4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,38) = strpad('AMNALL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,39) = strpad('AMNAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,40) = strpad('AMNAUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,41) = strpad('AMT in component parameter_values (minute)'); LEGEND_CONSTANTS(:,42) = strpad('ANCSNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,43) = strpad('ANGINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,44) = strpad('ANGKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,45) = strpad('ANMALD in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,46) = strpad('ANMAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,47) = strpad('ANMARL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,48) = strpad('ANMEM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,49) = strpad('ANMKEL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,50) = strpad('ANMKEM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,51) = strpad('ANMLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,52) = strpad('ANMNAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,53) = strpad('ANMSLT in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,54) = strpad('ANMTM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,55) = strpad('ANMUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,56) = strpad('ANPTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,57) = strpad('ANPXAF in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,58) = strpad('ANPXUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,59) = strpad('ANT in component parameter_values (minute)'); LEGEND_CONSTANTS(:,60) = strpad('ANULL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,61) = strpad('ANUM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,62) = strpad('ANUVM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,63) = strpad('ANV in component parameter_values (minute)'); LEGEND_CONSTANTS(:,64) = strpad('ANXM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,65) = strpad('ANY in component parameter_values (litre)'); LEGEND_CONSTANTS(:,66) = strpad('AR1LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,67) = strpad('AR2LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,68) = strpad('ARF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,69) = strpad('AUC1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,70) = strpad('AUDMP in component parameter_values (minute)'); LEGEND_CONSTANTS(:,71) = strpad('AUK in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,72) = strpad('AUL in component parameter_values (litre)'); LEGEND_CONSTANTS(:,73) = strpad('AULPM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,74) = strpad('AUM1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,75) = strpad('AUM2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,76) = strpad('AUMAX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,77) = strpad('AUMIN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,78) = strpad('AUMK1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,79) = strpad('AUN1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,80) = strpad('AURG in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,81) = strpad('AUS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,82) = strpad('AUSLP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,83) = strpad('AUTO in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,84) = strpad('AUTOGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,85) = strpad('AUTOSN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,86) = strpad('AUX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,87) = strpad('BAROTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,88) = strpad('CFC in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,89) = strpad('CKEEX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,90) = strpad('CMPTSS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,91) = strpad('CN2 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,92) = strpad('CN7 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,93) = strpad('CNR in component parameter_values (monovalent_mEq_per_litre)'); LEGEND_CONSTANTS(:,94) = strpad('CPF in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,95) = strpad('CPK in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,96) = strpad('CPR in component parameter_values (gram_per_L)'); LEGEND_CONSTANTS(:,97) = strpad('CV in component parameter_values (L_per_mmHg)'); LEGEND_CONSTANTS(:,98) = strpad('CRRFLX in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,99) = strpad('DIURET in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,100) = strpad('DHDTR in component parameter_values (per_mmHg_per_minute)'); LEGEND_CONSTANTS(:,101) = strpad('DTNAR in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,102) = strpad('DTNARL in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,103) = strpad('EARK in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,104) = strpad('EARLL in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,105) = strpad('EFAFR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,106) = strpad('EXC in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,107) = strpad('EXCML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,108) = strpad('EXCXP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,109) = strpad('EXCXP2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,110) = strpad('EXE in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,111) = strpad('GCOPF in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,112) = strpad('GFLC in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,113) = strpad('GFNDMP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,114) = strpad('GFNLL in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,115) = strpad('GPPD in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,116) = strpad('HM6 in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,117) = strpad('HM8 in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,118) = strpad('HTAUML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,119) = strpad('KORGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,120) = strpad('KORNER in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,121) = strpad('KORREN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,122) = strpad('KORTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,123) = strpad('LPDE in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,124) = strpad('LPK in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,125) = strpad('LPPR in component parameter_values (gram_per_minute)'); LEGEND_CONSTANTS(:,126) = strpad('MDFL1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,127) = strpad('MDFLKM in component parameter_values (monovalent_mEq_per_litre)'); LEGEND_CONSTANTS(:,128) = strpad('MDFLW2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,129) = strpad('MDFLWX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,130) = strpad('MDMP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,131) = strpad('O2A in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,132) = strpad('O2CHMO in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,133) = strpad('OMM in component parameter_values (mL_per_minute)'); LEGEND_CONSTANTS(:,134) = strpad('PA4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,135) = strpad('PAEX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,136) = strpad('PCE in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,137) = strpad('PCR in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,138) = strpad('PR1LL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,139) = strpad('PGHF in component parameter_values (L_mmHg_per_gram)'); LEGEND_CONSTANTS(:,140) = strpad('PK2 in component parameter_values (mmHg_per_mL)'); LEGEND_CONSTANTS(:,141) = strpad('PL2 in component parameter_values (L_mL_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,142) = strpad('PLDF in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,143) = strpad('PM5 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,144) = strpad('PO2ADV in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,145) = strpad('POK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,146) = strpad('POM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,147) = strpad('POM2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,148) = strpad('PON in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,149) = strpad('POR in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,150) = strpad('POZ in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,151) = strpad('PXTP in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,152) = strpad('QAOLM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,153) = strpad('QRF in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,154) = strpad('RABSC in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,155) = strpad('RAM in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,156) = strpad('RAPRSP in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,157) = strpad('RAR in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,158) = strpad('RCDFDP in component parameter_values (minute)'); LEGEND_CONSTANTS(:,159) = strpad('RCDFPC in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,160) = strpad('REK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,161) = strpad('RFABKM in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,162) = strpad('RFABDM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,163) = strpad('RFABDP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,164) = strpad('RFCDFT in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,165) = strpad('RKC in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,166) = strpad('RNAGTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,167) = strpad('RNAUAD in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,168) = strpad('RPS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,169) = strpad('RTPPR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,170) = strpad('RTPPRS in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,171) = strpad('RTSPRS in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,172) = strpad('RVRS in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,173) = strpad('RVSM in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,174) = strpad('SR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,175) = strpad('SR2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,176) = strpad('SRK in component parameter_values (minute)'); LEGEND_CONSTANTS(:,177) = strpad('SRK2 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,178) = strpad('STA in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,179) = strpad('TENSGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,180) = strpad('TENSTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,181) = strpad('TIMETR in component parameter_values (minute)'); LEGEND_CONSTANTS(:,182) = strpad('TRNSFS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,183) = strpad('TRPL in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,184) = strpad('TSSLML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,185) = strpad('TSSLTC in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,186) = strpad('TVDDL in component parameter_values (minute)'); LEGEND_CONSTANTS(:,187) = strpad('U in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,188) = strpad('VID1 in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,189) = strpad('VIDML in component parameter_values (litre2_per_monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,190) = strpad('VNTSTM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,191) = strpad('VP1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,192) = strpad('VPTISS in component parameter_values (litre)'); LEGEND_CONSTANTS(:,193) = strpad('VTSF in component parameter_values (litre)'); LEGEND_CONSTANTS(:,194) = strpad('VV9 in component parameter_values (litre)'); LEGEND_CONSTANTS(:,195) = strpad('X in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,196) = strpad('Z in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,197) = strpad('Z4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,198) = strpad('Z5 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,199) = strpad('Z6 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,200) = strpad('Z7 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,201) = strpad('Z10 in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,202) = strpad('Z11 in component parameter_values (per_mmHg2)'); LEGEND_CONSTANTS(:,203) = strpad('Z12 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,204) = strpad('Z13 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,205) = strpad('Z14 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,206) = strpad('Z16 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,207) = strpad('Z18 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,208) = strpad('Z19 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,209) = strpad('KID in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,210) = strpad('URFORM in component parameter_values (mOsm_per_minute)'); LEGEND_CONSTANTS(:,211) = strpad('AUV in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,212) = strpad('AUY in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,213) = strpad('O2M in component parameter_values (mL_per_minute)'); LEGEND_CONSTANTS(:,214) = strpad('NID in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,215) = strpad('ATRFBM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,216) = strpad('GBL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,217) = strpad('RNAUGN in component parameter_values (minute_per_L)'); LEGEND_CONSTANTS(:,218) = strpad('RNAULL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,219) = strpad('RNAUUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,220) = strpad('HSR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,221) = strpad('HSL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,222) = strpad('HMK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,223) = strpad('PO2AMB in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,224) = strpad('HKM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,225) = strpad('DR in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,226) = strpad('ANPKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,227) = strpad('RMULT1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,228) = strpad('GLPCA in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,229) = strpad('RFN in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,230) = strpad('RFABX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,231) = strpad('ANPINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,232) = strpad('FIS in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,233) = strpad('CPPD in component parameter_values (gram_per_L)'); LEGEND_CONSTANTS(:,234) = strpad('TRRBC in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,235) = strpad('HYL in component parameter_values (gram)'); LEGEND_CONSTANTS(:,236) = strpad('ATRVM in component parameter_values (litre)'); LEGEND_CONSTANTS(:,237) = strpad('ADHC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,238) = strpad('AHY_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,239) = strpad('AMC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,240) = strpad('AMM1T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,241) = strpad('AMM2_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,242) = strpad('ANC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,243) = strpad('ANPC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,244) = strpad('ANX1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,245) = strpad('AR1T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,246) = strpad('AR2T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,247) = strpad('AR3T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,248) = strpad('AU1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,249) = strpad('AU4_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,250) = strpad('AU6_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,251) = strpad('DTKA_init in component state_variables (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,252) = strpad('HMD1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,253) = strpad('HPL_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,254) = strpad('HPR_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,255) = strpad('KTOT_init in component state_variables (monovalent_mEq)'); LEGEND_CONSTANTS(:,256) = strpad('NAE_init in component state_variables (monovalent_mEq)'); LEGEND_CONSTANTS(:,257) = strpad('O2VAD1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,258) = strpad('OSV_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,259) = strpad('OVA_init in component state_variables (mL_per_L)'); LEGEND_CONSTANTS(:,260) = strpad('OVS_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,261) = strpad('PAR1_init in component state_variables (mmHg)'); LEGEND_CONSTANTS(:,262) = strpad('PC_init in component state_variables (mmHg)'); LEGEND_CONSTANTS(:,263) = strpad('PLUR_init in component state_variables (mOsm)'); LEGEND_CONSTANTS(:,264) = strpad('PPR1_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,265) = strpad('PRP_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,266) = strpad('QO2T_init in component state_variables (mL)'); LEGEND_CONSTANTS(:,267) = strpad('QOM1_init in component state_variables (mL)'); LEGEND_CONSTANTS(:,268) = strpad('RNAUG3_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,269) = strpad('TSP_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,270) = strpad('TVD_init in component state_variables (L_per_minute)'); LEGEND_CONSTANTS(:,271) = strpad('VAS1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,272) = strpad('VIC_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,273) = strpad('VLA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,274) = strpad('VPA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,275) = strpad('VPF1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,276) = strpad('VP_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,277) = strpad('VRA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,278) = strpad('VRC_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,279) = strpad('VTS2_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,280) = strpad('VTW_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,281) = strpad('VV6_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,282) = strpad('VV7_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,283) = strpad('VVS1_init in component state_variables (litre)'); LEGEND_VOI = strpad('time in component environment (minute)'); LEGEND_ALGEBRAIC(:,5) = strpad('CKE in component extracellular_K_concentration (monovalent_mEq_per_litre)'); LEGEND_ALGEBRAIC(:,4) = strpad('VEC in component extracellular_fluid_volume (litre)'); LEGEND_ALGEBRAIC(:,6) = strpad('CNA in component extracellular_Na_concentration (monovalent_mEq_per_litre)'); LEGEND_STATES(:,1) = strpad('VTW in component total_body_water (litre)'); LEGEND_CONSTANTS(:,284) = strpad('A1K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,285) = strpad('A2K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,286) = strpad('A3K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,287) = strpad('A4K in component parameter_values (minute)'); LEGEND_CONSTANTS(:,288) = strpad('A4K2 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,289) = strpad('AARK in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,290) = strpad('AARLL in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,291) = strpad('ADHINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,292) = strpad('ADHKLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,293) = strpad('ADHKUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,294) = strpad('ADHPAM in component parameter_values (per_mmHg2)'); LEGEND_CONSTANTS(:,295) = strpad('ADHPUL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,296) = strpad('ADHTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,297) = strpad('ADHVLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,298) = strpad('ADHVUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,299) = strpad('AH10 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,300) = strpad('AH11 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,301) = strpad('AH9 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,302) = strpad('AHMNAR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,303) = strpad('AHTHM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,304) = strpad('ALCLK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,305) = strpad('ALDINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,306) = strpad('ALDKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,307) = strpad('ALDMM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,308) = strpad('AM1LL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,309) = strpad('AM1UL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,310) = strpad('AMCSNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,311) = strpad('AMKM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,312) = strpad('AMKMUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,313) = strpad('AMM1LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,314) = strpad('AMM4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,315) = strpad('AMNALL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,316) = strpad('AMNAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,317) = strpad('AMNAUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,318) = strpad('AMT in component parameter_values (minute)'); LEGEND_CONSTANTS(:,319) = strpad('ANCSNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,320) = strpad('ANGINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,321) = strpad('ANGKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,322) = strpad('ANMALD in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,323) = strpad('ANMAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,324) = strpad('ANMARL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,325) = strpad('ANMEM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,326) = strpad('ANMKEL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,327) = strpad('ANMKEM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,328) = strpad('ANMLL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,329) = strpad('ANMNAM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,330) = strpad('ANMSLT in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,331) = strpad('ANMTM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,332) = strpad('ANMUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,333) = strpad('ANPTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,334) = strpad('ANPXAF in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,335) = strpad('ANPXUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,336) = strpad('ANT in component parameter_values (minute)'); LEGEND_CONSTANTS(:,337) = strpad('ANULL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,338) = strpad('ANUM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,339) = strpad('ANUVM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,340) = strpad('ANV in component parameter_values (minute)'); LEGEND_CONSTANTS(:,341) = strpad('ANXM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,342) = strpad('ANY in component parameter_values (litre)'); LEGEND_CONSTANTS(:,343) = strpad('AR1LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,344) = strpad('AR2LM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,345) = strpad('ARF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,346) = strpad('AUC1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,347) = strpad('AUDMP in component parameter_values (minute)'); LEGEND_CONSTANTS(:,348) = strpad('AUK in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,349) = strpad('AUL in component parameter_values (litre)'); LEGEND_CONSTANTS(:,350) = strpad('AULPM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,351) = strpad('AUM1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,352) = strpad('AUM2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,353) = strpad('AUMAX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,354) = strpad('AUMIN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,355) = strpad('AUMK1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,356) = strpad('AUN1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,357) = strpad('AURG in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,358) = strpad('AUS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,359) = strpad('AUSLP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,360) = strpad('AUTO in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,361) = strpad('AUTOGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,362) = strpad('AUTOSN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,363) = strpad('AUX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,364) = strpad('BAROTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,365) = strpad('CFC in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,366) = strpad('CKEEX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,367) = strpad('CMPTSS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,368) = strpad('CN2 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,369) = strpad('CN7 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,370) = strpad('CNR in component parameter_values (monovalent_mEq_per_litre)'); LEGEND_CONSTANTS(:,371) = strpad('CPF in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,372) = strpad('CPK in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,373) = strpad('CPR in component parameter_values (gram_per_L)'); LEGEND_CONSTANTS(:,374) = strpad('CV in component parameter_values (L_per_mmHg)'); LEGEND_CONSTANTS(:,375) = strpad('CRRFLX in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,376) = strpad('DIURET in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,377) = strpad('DHDTR in component parameter_values (per_mmHg_per_minute)'); LEGEND_CONSTANTS(:,378) = strpad('DTNAR in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,379) = strpad('DTNARL in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,380) = strpad('EARK in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,381) = strpad('EARLL in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,382) = strpad('EFAFR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,383) = strpad('EXC in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,384) = strpad('EXCML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,385) = strpad('EXCXP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,386) = strpad('EXCXP2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,387) = strpad('EXE in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,388) = strpad('GCOPF in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,389) = strpad('GFLC in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,390) = strpad('GFNDMP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,391) = strpad('GFNLL in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,392) = strpad('GPPD in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,393) = strpad('HM6 in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,394) = strpad('HM8 in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,395) = strpad('HTAUML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,396) = strpad('KORGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,397) = strpad('KORNER in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,398) = strpad('KORREN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,399) = strpad('KORTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,400) = strpad('LPDE in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,401) = strpad('LPK in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,402) = strpad('LPPR in component parameter_values (gram_per_minute)'); LEGEND_CONSTANTS(:,403) = strpad('MDFL1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,404) = strpad('MDFLKM in component parameter_values (monovalent_mEq_per_litre)'); LEGEND_CONSTANTS(:,405) = strpad('MDFLW2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,406) = strpad('MDFLWX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,407) = strpad('MDMP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,408) = strpad('O2A in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,409) = strpad('O2CHMO in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,410) = strpad('OMM in component parameter_values (mL_per_minute)'); LEGEND_CONSTANTS(:,411) = strpad('PA4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,412) = strpad('PAEX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,413) = strpad('PCE in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,414) = strpad('PCR in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,415) = strpad('PR1LL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,416) = strpad('PGHF in component parameter_values (L_mmHg_per_gram)'); LEGEND_CONSTANTS(:,417) = strpad('PK2 in component parameter_values (mmHg_per_mL)'); LEGEND_CONSTANTS(:,418) = strpad('PL2 in component parameter_values (L_mL_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,419) = strpad('PLDF in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,420) = strpad('PM5 in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,421) = strpad('PO2ADV in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,422) = strpad('POK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,423) = strpad('POM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,424) = strpad('POM2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,425) = strpad('PON in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,426) = strpad('POR in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,427) = strpad('POZ in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,428) = strpad('PXTP in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,429) = strpad('QAOLM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,430) = strpad('QRF in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,431) = strpad('RABSC in component parameter_values (per_mmHg)'); LEGEND_CONSTANTS(:,432) = strpad('RAM in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,433) = strpad('RAPRSP in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,434) = strpad('RAR in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,435) = strpad('RCDFDP in component parameter_values (minute)'); LEGEND_CONSTANTS(:,436) = strpad('RCDFPC in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,437) = strpad('REK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,438) = strpad('RFABKM in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,439) = strpad('RFABDM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,440) = strpad('RFABDP in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,441) = strpad('RFCDFT in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,442) = strpad('RKC in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,443) = strpad('RNAGTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,444) = strpad('RNAUAD in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,445) = strpad('RPS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,446) = strpad('RTPPR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,447) = strpad('RTPPRS in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,448) = strpad('RTSPRS in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,449) = strpad('RVRS in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,450) = strpad('RVSM in component parameter_values (mmHg_minute_per_L)'); LEGEND_CONSTANTS(:,451) = strpad('SR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,452) = strpad('SR2 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,453) = strpad('SRK in component parameter_values (minute)'); LEGEND_CONSTANTS(:,454) = strpad('SRK2 in component parameter_values (minute)'); LEGEND_CONSTANTS(:,455) = strpad('STA in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,456) = strpad('TENSGN in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,457) = strpad('TENSTC in component parameter_values (minute)'); LEGEND_CONSTANTS(:,458) = strpad('TIMETR in component parameter_values (minute)'); LEGEND_CONSTANTS(:,459) = strpad('TRNSFS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,460) = strpad('TRPL in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,461) = strpad('TSSLML in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,462) = strpad('TSSLTC in component parameter_values (per_minute)'); LEGEND_CONSTANTS(:,463) = strpad('TVDDL in component parameter_values (minute)'); LEGEND_CONSTANTS(:,464) = strpad('U in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,465) = strpad('VID1 in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,466) = strpad('VIDML in component parameter_values (litre2_per_monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,467) = strpad('VNTSTM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,468) = strpad('VP1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,469) = strpad('VPTISS in component parameter_values (litre)'); LEGEND_CONSTANTS(:,470) = strpad('VTSF in component parameter_values (litre)'); LEGEND_CONSTANTS(:,471) = strpad('VV9 in component parameter_values (litre)'); LEGEND_CONSTANTS(:,472) = strpad('X in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,473) = strpad('Z in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,474) = strpad('Z4 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,475) = strpad('Z5 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,476) = strpad('Z6 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,477) = strpad('Z7 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,478) = strpad('Z10 in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,479) = strpad('Z11 in component parameter_values (per_mmHg2)'); LEGEND_CONSTANTS(:,480) = strpad('Z12 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,481) = strpad('Z13 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,482) = strpad('Z14 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,483) = strpad('Z16 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,484) = strpad('Z18 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,485) = strpad('Z19 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,486) = strpad('KID in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,487) = strpad('URFORM in component parameter_values (mOsm_per_minute)'); LEGEND_CONSTANTS(:,488) = strpad('AUV in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,489) = strpad('AUY in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,490) = strpad('O2M in component parameter_values (mL_per_minute)'); LEGEND_CONSTANTS(:,491) = strpad('NID in component parameter_values (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,492) = strpad('ATRFBM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,493) = strpad('GBL in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,494) = strpad('RNAUGN in component parameter_values (minute_per_L)'); LEGEND_CONSTANTS(:,495) = strpad('RNAULL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,496) = strpad('RNAUUL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,497) = strpad('HSR in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,498) = strpad('HSL in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,499) = strpad('HMK in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,500) = strpad('PO2AMB in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,501) = strpad('HKM in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,502) = strpad('DR in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,503) = strpad('ANPKNS in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,504) = strpad('RMULT1 in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,505) = strpad('GLPCA in component parameter_values (mmHg)'); LEGEND_CONSTANTS(:,506) = strpad('RFN in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,507) = strpad('RFABX in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,508) = strpad('ANPINF in component parameter_values (dimensionless)'); LEGEND_CONSTANTS(:,509) = strpad('FIS in component parameter_values (L_per_minute_per_mmHg)'); LEGEND_CONSTANTS(:,510) = strpad('CPPD in component parameter_values (gram_per_L)'); LEGEND_CONSTANTS(:,511) = strpad('TRRBC in component parameter_values (L_per_minute)'); LEGEND_CONSTANTS(:,512) = strpad('HYL in component parameter_values (gram)'); LEGEND_CONSTANTS(:,513) = strpad('ATRVM in component parameter_values (litre)'); LEGEND_CONSTANTS(:,514) = strpad('ADHC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,515) = strpad('AHY_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,516) = strpad('AMC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,517) = strpad('AMM1T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,518) = strpad('AMM2_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,519) = strpad('ANC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,520) = strpad('ANPC_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,521) = strpad('ANX1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,522) = strpad('AR1T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,523) = strpad('AR2T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,524) = strpad('AR3T_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,525) = strpad('AU1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,526) = strpad('AU4_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,527) = strpad('AU6_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,528) = strpad('DTKA_init in component state_variables (monovalent_mEq_per_minute)'); LEGEND_CONSTANTS(:,529) = strpad('HMD1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,530) = strpad('HPL_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,531) = strpad('HPR_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,532) = strpad('KTOT_init in component state_variables (monovalent_mEq)'); LEGEND_CONSTANTS(:,533) = strpad('NAE_init in component state_variables (monovalent_mEq)'); LEGEND_CONSTANTS(:,534) = strpad('O2VAD1_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,535) = strpad('OSV_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,536) = strpad('OVA_init in component state_variables (mL_per_L)'); LEGEND_CONSTANTS(:,537) = strpad('OVS_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,538) = strpad('PAR1_init in component state_variables (mmHg)'); LEGEND_CONSTANTS(:,539) = strpad('PC_init in component state_variables (mmHg)'); LEGEND_CONSTANTS(:,540) = strpad('PLUR_init in component state_variables (mOsm)'); LEGEND_CONSTANTS(:,541) = strpad('PPR1_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,542) = strpad('PRP_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,543) = strpad('QO2T_init in component state_variables (mL)'); LEGEND_CONSTANTS(:,544) = strpad('QOM1_init in component state_variables (mL)'); LEGEND_CONSTANTS(:,545) = strpad('RNAUG3_init in component state_variables (dimensionless)'); LEGEND_CONSTANTS(:,546) = strpad('TSP_init in component state_variables (gram)'); LEGEND_CONSTANTS(:,547) = strpad('TVD_init in component state_variables (L_per_minute)'); LEGEND_CONSTANTS(:,548) = strpad('VAS1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,549) = strpad('VIC_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,550) = strpad('VLA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,551) = strpad('VPA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,552) = strpad('VPF1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,553) = strpad('VP_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,554) = strpad('VRA1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,555) = strpad('VRC_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,556) = strpad('VTS2_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,557) = strpad('VTW_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,558) = strpad('VV6_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,559) = strpad('VV7_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,560) = strpad('VVS1_init in component state_variables (litre)'); LEGEND_CONSTANTS(:,561) = strpad('NED in component extracellular_Na_concentration (monovalent_mEq_per_minute)'); LEGEND_STATES(:,2) = strpad('NAE in component extracellular_Na_concentration (monovalent_mEq)'); LEGEND_CONSTANTS(:,562) = strpad('AMK1 in component aldosterone_effect_on_cellular_K_distribution (dimensionless)'); LEGEND_ALGEBRAIC(:,1) = strpad('KE in component extracellular_K_concentration (monovalent_mEq)'); LEGEND_STATES(:,3) = strpad('KTOT in component extracellular_K_concentration (monovalent_mEq)'); LEGEND_CONSTANTS(:,563) = strpad('KTOTD in component extracellular_K_concentration (monovalent_mEq_per_minute)'); LEGEND_STATES(:,4) = strpad('VIC in component intracellular_fluid_volume (litre)'); LEGEND_ALGEBRAIC(:,3) = strpad('CKI in component intracellular_K_concentration (monovalent_mEq_per_litre)'); LEGEND_ALGEBRAIC(:,2) = strpad('KI in component intracellular_K_concentration (monovalent_mEq)'); LEGEND_ALGEBRAIC(:,8) = strpad('VID in component intracellular_fluid_volume (L_per_minute)'); LEGEND_ALGEBRAIC(:,7) = strpad('CCD in component intracellular_fluid_volume (monovalent_mEq_per_litre)'); LEGEND_RATES(:,2) = strpad('d/dt NAE in component extracellular_Na_concentration (monovalent_mEq)'); LEGEND_RATES(:,3) = strpad('d/dt KTOT in component extracellular_K_concentration (monovalent_mEq)'); LEGEND_RATES(:,4) = strpad('d/dt VIC in component intracellular_fluid_volume (litre)'); LEGEND_RATES(:,1) = strpad('d/dt VTW in component total_body_water (litre)'); 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) = 1.037; CONSTANTS(:,2) = 0.000980838; CONSTANTS(:,3) = 0.977181; CONSTANTS(:,4) = 0.0959449; CONSTANTS(:,5) = 0.0804374; CONSTANTS(:,6) = 0.000989; CONSTANTS(:,7) = 0.5; CONSTANTS(:,8) = 60; CONSTANTS(:,9) = 40000; CONSTANTS(:,10) = 0.1; CONSTANTS(:,11) = 40000; CONSTANTS(:,12) = 1; CONSTANTS(:,13) = 4; CONSTANTS(:,14) = 0; CONSTANTS(:,15) = 0.2; CONSTANTS(:,16) = 5; CONSTANTS(:,17) = 0.3; CONSTANTS(:,18) = 85; CONSTANTS(:,19) = 15; CONSTANTS(:,20) = 0.93617; CONSTANTS(:,21) = 2.5; CONSTANTS(:,22) = 0.333; CONSTANTS(:,23) = 1000; CONSTANTS(:,24) = 1; CONSTANTS(:,25) = 0.3; CONSTANTS(:,26) = 2; CONSTANTS(:,27) = 0.3; CONSTANTS(:,28) = 0; CONSTANTS(:,29) = 0; CONSTANTS(:,30) = 2.5; CONSTANTS(:,31) = 0; CONSTANTS(:,32) = 5; CONSTANTS(:,33) = 0.65; CONSTANTS(:,34) = 0.5; CONSTANTS(:,35) = 12; CONSTANTS(:,36) = 0.005; CONSTANTS(:,37) = 0.005; CONSTANTS(:,38) = 0.04; CONSTANTS(:,39) = 0.8; CONSTANTS(:,40) = 15; CONSTANTS(:,41) = 60; CONSTANTS(:,42) = 0.4; CONSTANTS(:,43) = 0; CONSTANTS(:,44) = 0; CONSTANTS(:,45) = 2.5; CONSTANTS(:,46) = 1.4; CONSTANTS(:,47) = 0.86; CONSTANTS(:,48) = 1.6; CONSTANTS(:,49) = 0.3; CONSTANTS(:,50) = 2; CONSTANTS(:,51) = 0.7; CONSTANTS(:,52) = 1; CONSTANTS(:,53) = 2; CONSTANTS(:,54) = 1.5; CONSTANTS(:,55) = 1.8; CONSTANTS(:,56) = 4; CONSTANTS(:,57) = 1.5; CONSTANTS(:,58) = 10; CONSTANTS(:,59) = 12; CONSTANTS(:,60) = 0.8; CONSTANTS(:,61) = 6; CONSTANTS(:,62) = 0; CONSTANTS(:,63) = 5000; CONSTANTS(:,64) = 0; CONSTANTS(:,65) = -0.2; CONSTANTS(:,66) = 0.005; CONSTANTS(:,67) = 0.005; CONSTANTS(:,68) = 0.5; CONSTANTS(:,69) = 0.3; CONSTANTS(:,70) = 0.3; CONSTANTS(:,71) = 0.004; CONSTANTS(:,72) = 1.5; CONSTANTS(:,73) = 0; CONSTANTS(:,74) = 3; CONSTANTS(:,75) = 1; CONSTANTS(:,76) = 5.0; CONSTANTS(:,77) = 0.4; CONSTANTS(:,78) = 0.3; CONSTANTS(:,79) = 0.5; CONSTANTS(:,80) = 1.0; CONSTANTS(:,81) = 1; CONSTANTS(:,82) = 1.5; CONSTANTS(:,83) = 0; CONSTANTS(:,84) = 7; CONSTANTS(:,85) = 0.9; CONSTANTS(:,86) = 1; CONSTANTS(:,87) = 0.16; CONSTANTS(:,88) = 0.01167; CONSTANTS(:,89) = 4; CONSTANTS(:,90) = 2; CONSTANTS(:,91) = 0.0212; CONSTANTS(:,92) = 0.2; CONSTANTS(:,93) = 139; CONSTANTS(:,94) = 0.0003; CONSTANTS(:,95) = 0.000253; CONSTANTS(:,96) = 40; CONSTANTS(:,97) = 0.1; CONSTANTS(:,98) = 0; CONSTANTS(:,99) = 1; CONSTANTS(:,100) = 0.05; CONSTANTS(:,101) = 0.675; CONSTANTS(:,102) = 1e-06; CONSTANTS(:,103) = 1; CONSTANTS(:,104) = 24; CONSTANTS(:,105) = 0; CONSTANTS(:,106) = 1; CONSTANTS(:,107) = 0.01; CONSTANTS(:,108) = 1.0; CONSTANTS(:,109) = 0.17; CONSTANTS(:,110) = 0; CONSTANTS(:,111) = 0.8092; CONSTANTS(:,112) = 0.0208333; CONSTANTS(:,113) = 3; CONSTANTS(:,114) = 0.001; CONSTANTS(:,115) = 1.0; CONSTANTS(:,116) = 1850; CONSTANTS(:,117) = 4.714e-08; CONSTANTS(:,118) = 0.4; CONSTANTS(:,119) = 1; CONSTANTS(:,120) = 0; CONSTANTS(:,121) = 0; CONSTANTS(:,122) = 10000; CONSTANTS(:,123) = 8; CONSTANTS(:,124) = 2.728e-14; CONSTANTS(:,125) = 0.03; CONSTANTS(:,126) = 10; CONSTANTS(:,127) = 0.667; CONSTANTS(:,128) = 0.005; CONSTANTS(:,129) = 0.01; CONSTANTS(:,130) = 0; CONSTANTS(:,131) = 0.1; CONSTANTS(:,132) = 0.01; CONSTANTS(:,133) = 57.1; CONSTANTS(:,134) = 1; CONSTANTS(:,135) = 2; CONSTANTS(:,136) = 1; CONSTANTS(:,137) = 15; CONSTANTS(:,138) = 0; CONSTANTS(:,139) = -2; CONSTANTS(:,140) = 0.79167; CONSTANTS(:,141) = 1.8; CONSTANTS(:,142) = 4.2; CONSTANTS(:,143) = 30; CONSTANTS(:,144) = 0.001; CONSTANTS(:,145) = 0.1; CONSTANTS(:,146) = 0.04; CONSTANTS(:,147) = 2; CONSTANTS(:,148) = 0.1; CONSTANTS(:,149) = 35; CONSTANTS(:,150) = 2; CONSTANTS(:,151) = 8; CONSTANTS(:,152) = 0.2; CONSTANTS(:,153) = 0.15; CONSTANTS(:,154) = 0.5; CONSTANTS(:,155) = 96.3; CONSTANTS(:,156) = 0; CONSTANTS(:,157) = 30.52; CONSTANTS(:,158) = 2000; CONSTANTS(:,159) = 0; CONSTANTS(:,160) = 1; CONSTANTS(:,161) = 0.03; CONSTANTS(:,162) = 0.3; CONSTANTS(:,163) = 1; CONSTANTS(:,164) = 0; CONSTANTS(:,165) = 5.8e-06; CONSTANTS(:,166) = 15; CONSTANTS(:,167) = 0; CONSTANTS(:,168) = 0; CONSTANTS(:,169) = 0.9; CONSTANTS(:,170) = 15.2; CONSTANTS(:,171) = 6; CONSTANTS(:,172) = 19.167; CONSTANTS(:,173) = 1; CONSTANTS(:,174) = 1; CONSTANTS(:,175) = 1; CONSTANTS(:,176) = 5; CONSTANTS(:,177) = 10000; CONSTANTS(:,178) = 0; CONSTANTS(:,179) = 0; CONSTANTS(:,180) = 0.05; CONSTANTS(:,181) = 0; CONSTANTS(:,182) = 0; CONSTANTS(:,183) = 0; CONSTANTS(:,184) = 0.15; CONSTANTS(:,185) = 0.005; CONSTANTS(:,186) = 30; CONSTANTS(:,187) = 4; CONSTANTS(:,188) = 0.01; CONSTANTS(:,189) = 0.01; CONSTANTS(:,190) = 1; CONSTANTS(:,191) = 0.01; CONSTANTS(:,192) = 0.0175; CONSTANTS(:,193) = 6; CONSTANTS(:,194) = 2.51; CONSTANTS(:,195) = 4; CONSTANTS(:,196) = 1; CONSTANTS(:,197) = 0.5; CONSTANTS(:,198) = 0.3; CONSTANTS(:,199) = 20; CONSTANTS(:,200) = 5; CONSTANTS(:,201) = 45; CONSTANTS(:,202) = 0.01; CONSTANTS(:,203) = 5; CONSTANTS(:,204) = 0.625; CONSTANTS(:,205) = 5; CONSTANTS(:,206) = 5; CONSTANTS(:,207) = 5; CONSTANTS(:,208) = 5; CONSTANTS(:,209) = 0.08; CONSTANTS(:,210) = 0.24; CONSTANTS(:,211) = 0.55; CONSTANTS(:,212) = 0; CONSTANTS(:,213) = 164; CONSTANTS(:,214) = 0.1; CONSTANTS(:,215) = 0; CONSTANTS(:,216) = 0; CONSTANTS(:,217) = 0.6; CONSTANTS(:,218) = 0.3; CONSTANTS(:,219) = 10; CONSTANTS(:,220) = 1; CONSTANTS(:,221) = 1; CONSTANTS(:,222) = 90; CONSTANTS(:,223) = 150; CONSTANTS(:,224) = 0.53333; CONSTANTS(:,225) = 0; CONSTANTS(:,226) = 0; CONSTANTS(:,227) = 1; CONSTANTS(:,228) = 1.0; CONSTANTS(:,229) = 1.22057; CONSTANTS(:,230) = 0.8; CONSTANTS(:,231) = 0; CONSTANTS(:,232) = 0; CONSTANTS(:,233) = 31.9719; CONSTANTS(:,234) = 0; CONSTANTS(:,235) = 60; CONSTANTS(:,236) = 0; CONSTANTS(:,237) = 1.0; CONSTANTS(:,238) = 0.301963; CONSTANTS(:,239) = 1.0; CONSTANTS(:,240) = 1.00269; CONSTANTS(:,241) = 1.09071; CONSTANTS(:,242) = 0.859476; CONSTANTS(:,243) = 1.0; CONSTANTS(:,244) = 0; CONSTANTS(:,245) = 1.02127; CONSTANTS(:,246) = 1.01179; CONSTANTS(:,247) = 1.1448; CONSTANTS(:,248) = 1.00007; CONSTANTS(:,249) = -0.060024; CONSTANTS(:,250) = 1.00132; CONSTANTS(:,251) = 0.0367573; CONSTANTS(:,252) = 1; CONSTANTS(:,253) = 1.00163; CONSTANTS(:,254) = 1.00237; CONSTANTS(:,255) = 3622.54; CONSTANTS(:,256) = 2109.91; CONSTANTS(:,257) = 2.368e-07; CONSTANTS(:,258) = 0.694163; CONSTANTS(:,259) = 204.497; CONSTANTS(:,260) = 0.699673; CONSTANTS(:,261) = 103.525; CONSTANTS(:,262) = 16.9144; CONSTANTS(:,263) = 159.549; CONSTANTS(:,264) = 0.419998; CONSTANTS(:,265) = 216.243; CONSTANTS(:,266) = 72.2362; CONSTANTS(:,267) = 48.0839; CONSTANTS(:,268) = 0; CONSTANTS(:,269) = 279.945; CONSTANTS(:,270) = 0.000980838; CONSTANTS(:,271) = 0.862514; CONSTANTS(:,272) = 25.0404; CONSTANTS(:,273) = 0.379883; CONSTANTS(:,274) = 0.38131; CONSTANTS(:,275) = 0.0123238; CONSTANTS(:,276) = 3.00449; CONSTANTS(:,277) = 0.100043; CONSTANTS(:,278) = 2.00439; CONSTANTS(:,279) = 0; CONSTANTS(:,280) = 39.8952; CONSTANTS(:,281) = 0.0101913; CONSTANTS(:,282) = 0.00366525; CONSTANTS(:,283) = 3.28246; CONSTANTS(:,284) = 0.5; CONSTANTS(:,285) = 60; CONSTANTS(:,286) = 40000; CONSTANTS(:,287) = 0.1; CONSTANTS(:,288) = 40000; CONSTANTS(:,289) = 1; CONSTANTS(:,290) = 4; CONSTANTS(:,291) = 0; CONSTANTS(:,292) = 0.2; CONSTANTS(:,293) = 5; CONSTANTS(:,294) = 0.3; CONSTANTS(:,295) = 85; CONSTANTS(:,296) = 15; CONSTANTS(:,297) = 0.93617; CONSTANTS(:,298) = 2.5; CONSTANTS(:,299) = 0.333; CONSTANTS(:,300) = 1000; CONSTANTS(:,301) = 1; CONSTANTS(:,302) = 0.3; CONSTANTS(:,303) = 2; CONSTANTS(:,304) = 0.3; CONSTANTS(:,305) = 0; CONSTANTS(:,306) = 0; CONSTANTS(:,307) = 2.5; CONSTANTS(:,308) = 0; CONSTANTS(:,309) = 5; CONSTANTS(:,310) = 0.65; CONSTANTS(:,311) = 0.5; CONSTANTS(:,312) = 12; CONSTANTS(:,313) = 0.005; CONSTANTS(:,314) = 0.005; CONSTANTS(:,315) = 0.04; CONSTANTS(:,316) = 0.8; CONSTANTS(:,317) = 15; CONSTANTS(:,318) = 60; CONSTANTS(:,319) = 0.4; CONSTANTS(:,320) = 0; CONSTANTS(:,321) = 0; CONSTANTS(:,322) = 2.5; CONSTANTS(:,323) = 1.4; CONSTANTS(:,324) = 0.86; CONSTANTS(:,325) = 1.6; CONSTANTS(:,326) = 0.3; CONSTANTS(:,327) = 2; CONSTANTS(:,328) = 0.7; CONSTANTS(:,329) = 1; CONSTANTS(:,330) = 2; CONSTANTS(:,331) = 1.5; CONSTANTS(:,332) = 1.8; CONSTANTS(:,333) = 4; CONSTANTS(:,334) = 1.5; CONSTANTS(:,335) = 10; CONSTANTS(:,336) = 12; CONSTANTS(:,337) = 0.8; CONSTANTS(:,338) = 6; CONSTANTS(:,339) = 0; CONSTANTS(:,340) = 5000; CONSTANTS(:,341) = 0; CONSTANTS(:,342) = -0.2; CONSTANTS(:,343) = 0.005; CONSTANTS(:,344) = 0.005; CONSTANTS(:,345) = 0.5; CONSTANTS(:,346) = 0.3; CONSTANTS(:,347) = 0.3; CONSTANTS(:,348) = 0.004; CONSTANTS(:,349) = 1.5; CONSTANTS(:,350) = 0; CONSTANTS(:,351) = 3; CONSTANTS(:,352) = 1; CONSTANTS(:,353) = 5.0; CONSTANTS(:,354) = 0.4; CONSTANTS(:,355) = 0.3; CONSTANTS(:,356) = 0.5; CONSTANTS(:,357) = 1.0; CONSTANTS(:,358) = 1; CONSTANTS(:,359) = 1.5; CONSTANTS(:,360) = 0; CONSTANTS(:,361) = 7; CONSTANTS(:,362) = 0.9; CONSTANTS(:,363) = 1; CONSTANTS(:,364) = 0.16; CONSTANTS(:,365) = 0.01167; CONSTANTS(:,366) = 4; CONSTANTS(:,367) = 2; CONSTANTS(:,368) = 0.0212; CONSTANTS(:,369) = 0.2; CONSTANTS(:,370) = 139; CONSTANTS(:,371) = 0.0003; CONSTANTS(:,372) = 0.000253; CONSTANTS(:,373) = 40; CONSTANTS(:,374) = 0.1; CONSTANTS(:,375) = 0; CONSTANTS(:,376) = 1; CONSTANTS(:,377) = 0.05; CONSTANTS(:,378) = 0.675; CONSTANTS(:,379) = 1e-06; CONSTANTS(:,380) = 1; CONSTANTS(:,381) = 24; CONSTANTS(:,382) = 0; CONSTANTS(:,383) = 1; CONSTANTS(:,384) = 0.01; CONSTANTS(:,385) = 1.0; CONSTANTS(:,386) = 0.17; CONSTANTS(:,387) = 0; CONSTANTS(:,388) = 0.8092; CONSTANTS(:,389) = 0.0208333; CONSTANTS(:,390) = 3; CONSTANTS(:,391) = 0.001; CONSTANTS(:,392) = 1.0; CONSTANTS(:,393) = 1850; CONSTANTS(:,394) = 4.714e-08; CONSTANTS(:,395) = 0.4; CONSTANTS(:,396) = 1; CONSTANTS(:,397) = 0; CONSTANTS(:,398) = 0; CONSTANTS(:,399) = 10000; CONSTANTS(:,400) = 8; CONSTANTS(:,401) = 2.728e-14; CONSTANTS(:,402) = 0.03; CONSTANTS(:,403) = 10; CONSTANTS(:,404) = 0.667; CONSTANTS(:,405) = 0.005; CONSTANTS(:,406) = 0.01; CONSTANTS(:,407) = 0; CONSTANTS(:,408) = 0.1; CONSTANTS(:,409) = 0.01; CONSTANTS(:,410) = 57.1; CONSTANTS(:,411) = 1; CONSTANTS(:,412) = 2; CONSTANTS(:,413) = 1; CONSTANTS(:,414) = 15; CONSTANTS(:,415) = 0; CONSTANTS(:,416) = -2; CONSTANTS(:,417) = 0.79167; CONSTANTS(:,418) = 1.8; CONSTANTS(:,419) = 4.2; CONSTANTS(:,420) = 30; CONSTANTS(:,421) = 0.001; CONSTANTS(:,422) = 0.1; CONSTANTS(:,423) = 0.04; CONSTANTS(:,424) = 2; CONSTANTS(:,425) = 0.1; CONSTANTS(:,426) = 35; CONSTANTS(:,427) = 2; CONSTANTS(:,428) = 8; CONSTANTS(:,429) = 0.2; CONSTANTS(:,430) = 0.15; CONSTANTS(:,431) = 0.5; CONSTANTS(:,432) = 96.3; CONSTANTS(:,433) = 0; CONSTANTS(:,434) = 30.52; CONSTANTS(:,435) = 2000; CONSTANTS(:,436) = 0; CONSTANTS(:,437) = 1; CONSTANTS(:,438) = 0.03; CONSTANTS(:,439) = 0.3; CONSTANTS(:,440) = 1; CONSTANTS(:,441) = 0; CONSTANTS(:,442) = 5.8e-06; CONSTANTS(:,443) = 15; CONSTANTS(:,444) = 0; CONSTANTS(:,445) = 0; CONSTANTS(:,446) = 0.9; CONSTANTS(:,447) = 15.2; CONSTANTS(:,448) = 6; CONSTANTS(:,449) = 19.167; CONSTANTS(:,450) = 1; CONSTANTS(:,451) = 1; CONSTANTS(:,452) = 1; CONSTANTS(:,453) = 5; CONSTANTS(:,454) = 10000; CONSTANTS(:,455) = 0; CONSTANTS(:,456) = 0; CONSTANTS(:,457) = 0.05; CONSTANTS(:,458) = 0; CONSTANTS(:,459) = 0; CONSTANTS(:,460) = 0; CONSTANTS(:,461) = 0.15; CONSTANTS(:,462) = 0.005; CONSTANTS(:,463) = 30; CONSTANTS(:,464) = 4; CONSTANTS(:,465) = 0.01; CONSTANTS(:,466) = 0.01; CONSTANTS(:,467) = 1; CONSTANTS(:,468) = 0.01; CONSTANTS(:,469) = 0.0175; CONSTANTS(:,470) = 6; CONSTANTS(:,471) = 2.51; CONSTANTS(:,472) = 4; CONSTANTS(:,473) = 1; CONSTANTS(:,474) = 0.5; CONSTANTS(:,475) = 0.3; CONSTANTS(:,476) = 20; CONSTANTS(:,477) = 5; CONSTANTS(:,478) = 45; CONSTANTS(:,479) = 0.01; CONSTANTS(:,480) = 5; CONSTANTS(:,481) = 0.625; CONSTANTS(:,482) = 5; CONSTANTS(:,483) = 5; CONSTANTS(:,484) = 5; CONSTANTS(:,485) = 5; CONSTANTS(:,486) = 0.08; CONSTANTS(:,487) = 0.24; CONSTANTS(:,488) = 0.55; CONSTANTS(:,489) = 0; CONSTANTS(:,490) = 164; CONSTANTS(:,491) = 0.1; CONSTANTS(:,492) = 0; CONSTANTS(:,493) = 0; CONSTANTS(:,494) = 0.6; CONSTANTS(:,495) = 0.3; CONSTANTS(:,496) = 10; CONSTANTS(:,497) = 1; CONSTANTS(:,498) = 1; CONSTANTS(:,499) = 90; CONSTANTS(:,500) = 150; CONSTANTS(:,501) = 0.53333; CONSTANTS(:,502) = 0; CONSTANTS(:,503) = 0; CONSTANTS(:,504) = 1; CONSTANTS(:,505) = 1.0; CONSTANTS(:,506) = 1.22057; CONSTANTS(:,507) = 0.8; CONSTANTS(:,508) = 0; CONSTANTS(:,509) = 0; CONSTANTS(:,510) = 31.9719; CONSTANTS(:,511) = 0; CONSTANTS(:,512) = 60; CONSTANTS(:,513) = 0; CONSTANTS(:,514) = 1.0; CONSTANTS(:,515) = 0.301963; CONSTANTS(:,516) = 1.0; CONSTANTS(:,517) = 1.00269; CONSTANTS(:,518) = 1.09071; CONSTANTS(:,519) = 0.859476; CONSTANTS(:,520) = 1.0; CONSTANTS(:,521) = 0; CONSTANTS(:,522) = 1.02127; CONSTANTS(:,523) = 1.01179; CONSTANTS(:,524) = 1.1448; CONSTANTS(:,525) = 1.00007; CONSTANTS(:,526) = -0.060024; CONSTANTS(:,527) = 1.00132; CONSTANTS(:,528) = 0.0367573; CONSTANTS(:,529) = 1; CONSTANTS(:,530) = 1.00163; CONSTANTS(:,531) = 1.00237; CONSTANTS(:,532) = 3622.54; CONSTANTS(:,533) = 2109.91; CONSTANTS(:,534) = 2.368e-07; CONSTANTS(:,535) = 0.694163; CONSTANTS(:,536) = 204.497; CONSTANTS(:,537) = 0.699673; CONSTANTS(:,538) = 103.525; CONSTANTS(:,539) = 16.9144; CONSTANTS(:,540) = 159.549; CONSTANTS(:,541) = 0.419998; CONSTANTS(:,542) = 216.243; CONSTANTS(:,543) = 72.2362; CONSTANTS(:,544) = 48.0839; CONSTANTS(:,545) = 0; CONSTANTS(:,546) = 279.945; CONSTANTS(:,547) = 0.000980838; CONSTANTS(:,548) = 0.862514; CONSTANTS(:,549) = 25.0404; CONSTANTS(:,550) = 0.379883; CONSTANTS(:,551) = 0.38131; CONSTANTS(:,552) = 0.0123238; CONSTANTS(:,553) = 3.00449; CONSTANTS(:,554) = 0.100043; CONSTANTS(:,555) = 2.00439; CONSTANTS(:,556) = 0; CONSTANTS(:,557) = 39.8952; CONSTANTS(:,558) = 0.0101913; CONSTANTS(:,559) = 0.00366525; CONSTANTS(:,560) = 3.28246; CONSTANTS(:,561) = ( CONSTANTS(:,491).*CONSTANTS(:,3) - CONSTANTS(:,4))+ CONSTANTS(:,460).*142.000; CONSTANTS(:,562) = (CONSTANTS(:,1) - 1.00000).*CONSTANTS(:,304)+1.00000; CONSTANTS(:,563) = CONSTANTS(:,486) - CONSTANTS(:,5); CONSTANTS(:,563) = CONSTANTS(:,2) - CONSTANTS(:,6); CONSTANTS(:,564) = CONSTANTS(:,561); CONSTANTS(:,565) = CONSTANTS(:,563); STATES(:,1) = CONSTANTS(:,557); STATES(:,2) = CONSTANTS(:,533); STATES(:,3) = CONSTANTS(:,532); STATES(:,4) = CONSTANTS(:,549); 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(:,563); RATES(:,2) = CONSTANTS(:,564); RATES(:,3) = CONSTANTS(:,565); ALGEBRAIC(:,4) = STATES(:,1) - STATES(:,4); ALGEBRAIC(:,6) = STATES(:,2)./ALGEBRAIC(:,4); ALGEBRAIC(:,1) = (STATES(:,3) - 3000.00)./( CONSTANTS(:,562).*9.33330); ALGEBRAIC(:,2) = STATES(:,3) - ALGEBRAIC(:,1); ALGEBRAIC(:,3) = ALGEBRAIC(:,2)./STATES(:,4); ALGEBRAIC(:,7) = ALGEBRAIC(:,3) - ALGEBRAIC(:,6); ALGEBRAIC(:,8) = ALGEBRAIC(:,7).*CONSTANTS(:,466); RATES(:,4) = ALGEBRAIC(:,8); 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(:,4) = STATES(:,1) - STATES(:,4); ALGEBRAIC(:,6) = STATES(:,2)./ALGEBRAIC(:,4); ALGEBRAIC(:,1) = (STATES(:,3) - 3000.00)./( CONSTANTS(:,562).*9.33330); ALGEBRAIC(:,2) = STATES(:,3) - ALGEBRAIC(:,1); ALGEBRAIC(:,3) = ALGEBRAIC(:,2)./STATES(:,4); ALGEBRAIC(:,7) = ALGEBRAIC(:,3) - ALGEBRAIC(:,6); ALGEBRAIC(:,8) = ALGEBRAIC(:,7).*CONSTANTS(:,466); ALGEBRAIC(:,5) = ALGEBRAIC(:,1)./ALGEBRAIC(:,4); 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