Utilizing a "guess and check" method inside an ODE
7 次查看(过去 30 天)
显示 更早的评论
I am trying to solve a 2nd order differential equation using a combination of ode45 and a "shooting" method.
k*T''+k'*T'=0
What I want to do is to define specific values of k for a span of x (which is my independent variable). k would have different values at every value of x. Then I will find my T value at every x using the ode45 code, and use it to recalculate k which would then be fed back in and so on and so forth until I achieved convergence.
To summarize: k=f(T) and T=f(x), solve k algebraically and use ode45 to solve the ode using different values of k and recalculate k at the new values of T. Repeat until I have T and k that agree with one another. Any suggestions?
2 个评论
Star Strider
2019-4-25
I’m not certain what you’re asking. If you’re ‘optimizing’ ‘k’, see if Optimizing a Simulation or Ordinary Differential Equation (link) will do what you want.
回答(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!