Professional Documents
Culture Documents
Solve ODEs
END using ODE-45
2. Matlab code
Brief discussion of code
I firstly defined my constants so that matlab would know what i mean by k1, k2, k3
without constantly writing the values of the constants. Then I added a time span so that
matlab would know the time range to run my code for. I then created vectors of initial
concentrations as this is given and needed to solve the ODEs. from this, i could then
solve the ODEs using ODE-45 function
A full description of my code is listed in the appendix.
This is the diagram produced in the scope once I ran the simulink code
Appendix