Which of these solutions is correct for a system of differential equations? And why do they give different results?

4 visualizaciones (últimos 30 días)

Respuesta aceptada

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 15 de Jun. de 2021
In this one, you have inserted a wrong sign:
function dydt = fSystem(t, y, beta1, alpha2, beta2, p, psi, T)
f2 = -alpha2*y(2)+beta2+y(1)*y(2); %% ERR: 'beta2+' has to be 'beta2*'
g = beta1*y(2)+p*f2*y(1)^(-1)-psi*(T*y(1))^(-1);
dydt(1) = g*y(1)-beta1*y(1)*y(2);
dydt(2) = f2;
dydt = dydt';
end

Más respuestas (0)

Categorías

Más información sobre Ordinary Differential Equations 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!

Translated by