This is from the actual tutorial: https://www.youtube.com/watch?v=9nnaFaDlmuc&feature=youtu.be
but when I plug the following commands in :
tSpan=[0;10]; x0=[4999;1;0]; [tSol,xSol] =ode45(@SIRmodel,tSpan, x0) function dxdt=SIRmodel(t,x) dxdt=[-2*x(1)*x(2)/5000; 2*x(1)*x(2)/5000-2*x(2)/3;2*x(2)/3]; end
I get this error message: Undefined function or variable 'SIRmodel'.
Error in odearguments (line 90) f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45 (line 115) odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
>> Was there a mistake in the video?
Best Answer