# Generated Code

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

The raw code is available.

/* There are a total of 0 entries in the algebraic variable array. There are a total of 3 entries in each of the rate and state variable arrays. There are a total of 3 entries in the constant variable array. */ /* * VOI is t in component main (dimensionless). * STATES[0] is x in component main (dimensionless). * STATES[1] is y in component main (dimensionless). * STATES[2] is z in component main (dimensionless). * CONSTANTS[0] is sigma in component main (dimensionless). * CONSTANTS[1] is rho in component main (dimensionless). * CONSTANTS[2] is beta in component main (dimensionless). * RATES[0] is d/dt x in component main (dimensionless). * RATES[1] is d/dt y in component main (dimensionless). * RATES[2] is d/dt z in component main (dimensionless). */ void initConsts(double* CONSTANTS, double* RATES, double *STATES) { STATES[0] = 1; STATES[1] = 1; STATES[2] = 1; CONSTANTS[0] = 10; CONSTANTS[1] = 28; CONSTANTS[2] = 2.66667; } void computeRates(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { RATES[0] = CONSTANTS[0]*(STATES[1] - STATES[0]); RATES[1] = STATES[0]*(CONSTANTS[1] - STATES[2]) - STATES[1]; RATES[2] = STATES[0]*STATES[1] - CONSTANTS[2]*STATES[2]; } void computeVariables(double VOI, double* CONSTANTS, double* RATES, double* STATES, double* ALGEBRAIC) { }