Error while solving nonlinear differential equations using ode45
Mostrar comentarios más antiguos
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 comentarios
Alan Stevens
el 4 de Mayo de 2021
Editada: Alan Stevens
el 4 de Mayo de 2021
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
el 4 de Mayo de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programming en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
