Hi everyone, I'm trying to solve a system of 5 ODEs with intial conditions using ode45. I'm getting the error message of "Not enough input arguments". I've tried looking up what that means, but I'm still confused. If anyone could help me out with this, that would be great!
This is the main body (saved as ode.m)
function f = ode(t,Y); r=0.2; M=300;
aa=1;
muf=5; aact=1; af=1; mu1=0.1; mu2=0.5; lam = 0.23; tau = 0.36; f=zeros(5,1); f(1,1) = r*Y(1)*(1-Y(1))-lam*Y(1)*Y(2)-aa*Y(5)*Y(1); f(2,1) = lam*Y(1)*Y(2) - muf*F-af*Y(4)*Y(2)-aa*Y(5)*Y(2); f(3,1) = Y(3)*(1-Y(3))-aact*Y(3)*Y(2); f(4,1) = aact*Y(3)*Y(2) - Y(4)*(mu1+tau); f(5,1) = tau*Y(4)-mu2*Y(5); end
And this is the execution script
clear all close all clc
[tv,Yv]=ode45(@ode,[0 1],[0 1 0]); plot(t,Y(:,1),t,Y(:,2),t,Y(:,3),t,Y(:,4),t,Y(:,5))
Thank you