Have some function, y = f(x,b), which produces a n-vector of model outputs using as input the n-vector "x" and scalar "b". We collect the following data (for example):
x | y_obs
0 | 2
2 | 5
3 | 6
For which value of the scalar "b" does the (yet unspecified) function, y = f(x,b), go perfectly through the measured values?
You are looking for the value of "b" for which all three residuals are zero - and hence the total of the residuals is zero.
Need to solve this using an inline function or a MATLAB function for f(b).