and I want to find the set of constants (C[2], C[3], C[4], C[7]) which will minimize the squared difference between this function and a given target function of the form
Where “f” is the curve with your parameters and “curve” is the curve you’re trying to get it close to.
Notice that “f” and “curve” are 3-vectors. You need them to be a scalar quantity. When you minimize something, you minimize a scalar value. You could chose for example to minimize the magnitude of the vector. That is a common choice.