Error while solving nonlinear differential equations using ode45
이전 댓글 표시
clear
%parameters are defined
global F1 F2 T1 X1 M C P100 F200 T200 F3
F2=2.0;P100=194.7;F200=208.0;F1=10.0,T1=40.0;X1=5.0;F3=50.0;T200=25.0; M=20.0;C=4.0;
tspan=[0 600] %simulation time
y0=[1.0 25.0 50.5] %arbitrary initial conditions
t=tspan
[t,y0]=ode45(@evapmodel,tspan,y0);
%figures
figure(1),clf
plot(t,y(:,1),t,y(:,2),t,y(:,3),'--')
legend('L2','X2','P2')
xlabel('t')
ylabel('Output Parameters')
Here is the ERROR :(
Unrecognized function or variable 'evapmodel'.
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
댓글 수: 2
Alan Stevens
2021년 5월 4일
편집: Alan Stevens
2021년 5월 4일
What does your evapmodel function look like, and have you saved it in a separate file, or at the end of the file you've shown? Are you running it from the workspace or the file?
BISMARK
2021년 5월 4일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Programming에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
