I can't seem to figure out what's wrong with the code
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
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);
Antworten (0)
Siehe auch
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!