Hi:
I just found you have the following typing "EDIT"
The idea you described is correct.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
What I understood from that post of yours is, that you have a set/vector of X-values and you want to chose any five of them to put them as parameters in function you have defined and a looking for that set of five values for which the function result is closest to a given value.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
My plan is to let minerr() to determine that set of five values.
Are you saying there is no way to use minerr() and needs a self written function (means I have to write LMA by myself) to achieve my goal?