Utilizing a "guess and check" method inside an ODE

조회 수: 2 (최근 30일)
Adam Cutright
Adam Cutright 2019년 4월 25일
댓글: Adam Cutright 2019년 4월 25일
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
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.
Adam Cutright
Adam Cutright 2019년 4월 25일
Apologies for my unclear issue. Basically k=f(T) and also T=f(x) so my main goal is to find T over a range of x, but in order to do that I also need to know k at every x value. My idea was to start with some guessed values of k, find T using the guessed k values, and then feed the T values back into my equation for k in order to have new guesses for k which can be used to find T. And so on and so forth until I have correct values not only for k, but also for T. Does this make more sense?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by