% % id2ss % function ss = id2ss(params,data) t = data.xdata; ydata2 = data.ydata; theta1 = params(1); theta2 = params(2); y2 = (theta1*theta2)*t; Res = y2 - ydata2; ss = Res*Res';