Filter löschen
Filter löschen

I can't seem to figure out what's wrong with the code

2 Ansichten (letzte 30 Tage)
Justin Lee
Justin Lee am 18 Aug. 2021
Kommentiert: Walter Roberson am 18 Aug. 2021
I've attached my copy of the code..and included is the original code from Berkeley Madonna
Not 100% sure what I'm doing wrong, and I need to determine when SA will reach steady state. How do I go about that?
  1 Kommentar
Walter Roberson
Walter Roberson am 18 Aug. 2021
Total SA = (SA1 + SA2)/140;
You have a space in the variable name. However, that variable does not appear to be used for anything.
function ddt = odefun(t,y)
[...]
% Flows
JSA = k12 * SA1 - k21 * SA2;
You have not defined SA1 or SA2 at that point
y0 = [SA1; SA2; ASA1; ASA2];
That hints that inside odefun you need to do
SA1 = y(1); SA2 = y(2); ASA1 = y(3); ASA2 = y(4);

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by