Dear users,
I'm trying to solve a ODE using a solver available in Matlab. The equation is the following:
ode23(@(Tm,t) -1E-5/(5000*(1531*Tm^2.38/(13+Tm)))*(Tm-30/600*t+225),[0 3600],225)
When a run the command, unfortunately, the following error message appears: -> Warning: Failure at t=0.000000e+00. Unable to meet integration tolerances without reducing the step size below the smallest value allowed (7.905050e-323) at time t.
I realized it is related to the term (1531*Tm^2.38/(13+Tm)). If I replace the expression by a constant, the problem no longer subsists.
Is matlab not able to tackle complex ODE equations? Or am I missing something?
Cheers!

댓글 수: 1

Walter Roberson
Walter Roberson 2015년 6월 2일
The objective function is passed time in as the first parameter. Time is often named "t". You have used "Tm" for the first parameter, which could suggest "time", but you have also used "t" for your second parameter, and people would be more likely to read that as "time". With the parameter names you have used, my reaction would be to think that you got the order wrong in the @() part, that you wanted @(t, Tm). If you are sure you got the right order, I recommend that you rename "t" as otherwise other people who read the code are going to be confused by it.

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

답변 (0개)

카테고리

태그

질문:

2015년 6월 2일

댓글:

2015년 6월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by