Which of these solutions is correct for a system of differential equations? And why do they give different results?
2 次查看(过去 30 天)
显示 更早的评论
Solution 2:
0 个评论
采纳的回答
Sulaymon Eshkabilov
2021-6-15
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
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!