I am trying to use Optimization Solver Routines ( OSR ) of MKL 10.0.3.021.

No of the reference manual is: 630813-027US.

On page 2727, there are descriptions about "fvec" parameter of dtrnlsp_solve. It is said that:

fvec( i ) = yi - fi(x)

I understand that here "yi" is the i-th known values to be approximated through optimized values of "x",

and "fi(x)" is the i-th values that are computed with "x" of the current stage and a given calculate-routine.

So the fvec(i) here is a kind of residual error between approximate value "fi(x)" and expected value "yi" for me.

Am I correct?

However, on page 2726, it is also said that:

-------------------------------------------

RCI_Request= 1 that indicates the requirement to recalculate the function at vector X and put the result into fvec.

-------------------------------------------

It seems to me that instead of yi - fi(x), it is the fi(x) that should be put into fvec by following this instruction.

Now you may understand how confused I am.

The example given on page 2737 to page 2743 is consistent with the descriptions on page 2726.

Unfortunately the example itself is not quite self-explaining.

Say, the dimension of function value ( m ) is the same with number of function variables ( n ), which is atypical.

And the fucntion "extendet_powell" is too simple. The coefficents for calculating f(x) are all hard-coded in the "extendet_powell".

What if I need an array of un-redictable values to calculate f(x) ?

How do I pass pointer of the array to the calculating routine?

Is it impossible to do so?

Or do I need to attach the array behind f(x) and use a fixed shift in memory to access the array?

Your help will be deeply appreciated.