I can't seem to figure out what's wrong with the code
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
Walter Roberson
el 18 de Ag. de 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);
Respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!