How to solve coupled non linear ode using ode 45
显示 更早的评论
I need to solve the following coupled odes, using ode 45.
- dthetadt = -(v/Dc)*log(v*theta/Dc);
2. dvdt = (v/a)*((b*v/Dc)*log(v*theta/Dc));
I wrote the following function. but it is not wotking. if u all have time can u give me some guide about to coding with two coupled equations problem
function [t,theta,v] = call_nonlin_ode()
tspan = [0 365];
theta0 = 10;
[t,theta,v] = ode45(@nonlin_ode,tspan,theta0)
function[dtheta,dvdt]= nonlin_ode(t,theta)
a = 0.01;
b = 0.02;
Dc = 1e-5;
v0 = 1e-2;
dthetadt = -(v/Dc)*log(v*theta/Dc);
dvdt = (v/a)*(b*v/Dc)*log(v*theta/Dc);
end
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!