Unrecognized function or variable 'Newton_Starbucks'.

조회 수: 1 (최근 30일)
Varun
Varun 2023년 2월 1일
답변: the cyclist 2023년 2월 1일
T0 = 140; %intial temperature of the body
T20 = 80; %temperature of the body after 20 minutes
TR = 22; %temperature of the air
tspan = [0 35]
tspan = 1×2
0 35
[t,T] = ode45(@Newton_Starbucks,tspan,T0)
Unrecognized function or variable 'Newton_Starbucks'.

Error in odearguments (line 92)
f0 = ode(t0,y0,args{:}); % ODE15I sets args{1} to yp0.

Error in ode45 (line 107)
odearguments(odeIsFuncHandle,odeTreatAsMFile, solver_name, ode, tspan, y0, options, varargin);

채택된 답변

the cyclist
the cyclist 2023년 2월 1일
I searched the internet for "Newton_Starbucks". The only link I found was this one. If that's relevant, then it seems to me that you need to define
function Tprime=Newton_Starbucks(t,T)
r=.001;
T_ambient=75;
Tprime=-r*(T-T_ambient);
end
and make sure your code can find it.
Next time you post a question, I suggest you read this guide about how to ask a good question.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by