Info

This question is closed. Reopen it to edit or answer.

4th order Runge-Kutta Method with multiple equations

1 view (last 30 days)
Arianna
Arianna on 21 Apr 2013
Closed: John D'Errico on 17 Sep 2017
dG/dt = -p1*(G-Gb)-XG+(Gmeal/v1), G(0)= G0 dX/dt = -p2*X + p3*(I-Ib), X(0)= 0 dI/dt = -n*(I-Ib)+ (U/(100*v1)) , I(0) = I0
I am provided with values for every variable except G, I, and X. I have figured out how to solve it by hand, but I can't seem to figure out the coding part correctly. Gmeal changes as t changes.
0.96 / min for 120 < t < 140 (all < signs are less than or equal to) 0.72 / min for 360 < t < 390 0.36 / min for 540 < t < 560 1.2 / min for 720 < t <760 0.0 / min for other times
I can provide more details from the problem statement if necessary. I am trying to solve for G, I , and X.
(Also, if anyone can help with part 2: simulate a system for U = 0 and typical intake, for which problem statement variables have been listed above.)

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!