
function RSS = siwrCost(tspan,params,data,x0fcn,yfcn)
params = abs(params);
[t,x] = ode45(@siwrODE,tspan,x0fcn(params),[],params);
y = yfcn(x,params);
RSS = ((data - y))'*((data - y)); %OLS