MATLAB: Code says not enough inputs in inline function

MATLABode45

b=2.2;
d=.4;
g=5.1;
w=6;
m=1.1;
n=2;
fsize=15;
sys=inline(' [(x(1).*(1-(x(1)/g)))-(x(1).*x(2)/((1+m*n)*(w*x(1).^2+1)+x(1))); b.*x(2)*(x(1)+n*(w*x(1).^2+1))./((1+m*n)*(w*x(1).^2+1)+x(1))-d*x(2)]');
options = odeset('RelTol' ,1e-4, 'AbsTol' ,1e-4);
[t,xa]=ode45(sys,[0 100],[.2 1.2],options);
set(gca, 'xtick', [0:2:8], 'FontSize' ,fsize);
plot (xa (: ,1), xa (:, 2));
can any one help me with the code plss Thanqq

Best Answer

Do not use inline() unless you are stuck at MATLAB R12 or earlier. Use anonymous functions instead.