how to solve an ode with time dependent parameter using matlab ??????
Show older comments
i have got a set of coupled differential equations given below and would really appreciate any help that would provide solving them ....:)
dx/dt=g*y(t)*I(t)-a*x(t)
dy/dt=beta*w(t)-g*y(t)*I(t)
dw/dt=a*x(t)-beta*w(t)
where a,beta,g are constants and I(t) is like a current supplied at a time t .. x,y and z are time dependent values that need to be calculated ...
Answers (1)
Sudarson Sinha
on 18 May 2021
Create a function for I(t) and call the function inside differential equation defined function.
function data=I(t,alpha,beta)
.....
end
function val = dydt(t,y,alpha, beta, gamma)
val(1) = .....+ I(t, alpha, beta)
val(2) = -gamma*......
....
end
something like this.
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!