I am trying to replicate an example problem that was found in an "into to combustion book"....... And of course, yes it is for school. Unfortunately there is no matlab class offered but, they expect us to know it.... I tried the example in matlab help found under the ode45 and couldnt even get this to run. I thought if i could get it to run, I would use this as a model for the problem i am working on.......... Solving four equations simultanously(adsbygoogle = window.adsbygoogle || []).push({});

Example problem code:

-----------------------------------------------------------

function dy = rigid(t,y)

dy = zeros(3,1);

dy(1) = y(2) * y(3);

dy(2) = -y(1) * y(3);

dy(3) = -0.51 * y(1) * y(2);

options = odeset('RelTol', 1e-4, 'AbsTol', [1e-4 1e-4 1e-5]);

[T,Y] = ode45(@rigid, [0 12], [0 1 1], options);

plot(T,Y(:,1),'-',T,Y(:,2),'-.',T,Y(:3),'.');

-----------------------------------------------------------

This Code Shows an error in the "dy(1) = y(2) * y(3);" line.

The equations i really need to solve for are as follows

-----------------------------------------------------------

dF/dt = -4.7316(10^8) * (F^0.1) * (O^1.65) * exp(-15098/T)

F(0) = .023918

dO/dt = 16 * (dF/dt)

O(0) = .382681

dP/dt = -17 * (dF/dt)

P(0) = 0

dT/dt = -3715.19* (dF/dt)

T(0) = 753

-----------------------------------------------------------

Any Help would greatly be appreceated, its due monday...

and it seems everything else is.

Thanks,

Jack

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Solving four ordinary dif equations simultaneously using ode45 matlab

Loading...

Similar Threads for Solving four ordinary | Date |
---|---|

Mathematica Solve Perturbation problem with mathematica | Dec 7, 2017 |

MATLAB Solving equation with integration using MATLAB | Aug 4, 2017 |

Mathematica Solving system of equations Mathematica | Apr 3, 2017 |

Mathematica Numerically solve recurrence relation | Mar 12, 2017 |

Solving differential equations in four variables | Nov 16, 2010 |

**Physics Forums - The Fusion of Science and Community**