MATLAB: How to use odeset and some variable parameters within ode45

MATLABode45odeset

I would like to solve the following ODE function:
*******************
function dc=reaction(t,c,s,q,w) % c is concentartion variable for all three substances.
dc = zeros(3,1); % a column vector
dc(1)=s*(c(2)-(c(2)*c(1))+c(1)-q*(c(1)^2));
dc(2)=(-c(2)-c(1)*c(2)+c(3))/s;
dc(3)=(c(1)-c(3))*w;
****************
where s, q and w are variables that could be changed / defined in the main code.
*******************
clc,clf,
c0=[25.00 1.000 20.00]; % initial values
tspan=[0 15]; % time range
s=1; q=1; w=0.2; % parameters
options = odeset('RelTol',1e-8);
[t,c] = ode45(@reaction,tspan,c0,options,[],s,q,w);
%[t,c] = ode45(@reaction,tspan,c0,[],s,q,w,options);
Non of the above ode45 syntaxes work and I get an error message saying:
??? Error using ==> reaction
Too many input arguments.
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
Error in ==> concentration_mh2 at 21
[t,c] = ode45(@reaction,tspan,c0,[],s,q,w,options);
I wonder what is the correct syntax in this case, I even tried evoking the reaction function by an anonymous function in the main code but it did not work fro me!
I appreciate if one can suggest me the right approach.

Best Answer

[t,c] = ode45(@(t,c) reaction(t,c,s,q,w),tspan,c0,options);