- #1

J-bonz

- 6

- 0

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