dfunc


lolita
11-05-2007, 04:54 AM
hi!
I'm using the multidimensional conjugate gradient method to find a function minima.

My function is so defined :
DP func(Vec_I_DP &x)

{
double result;
double pi=3.1416;
double interm;



result=cos(pi*(1-exp(-x[0]*(1+0.4/0.25*(x[1]-0.5)*(x[1]-0.5)))));
interm = pow((x[1]-0.5), 4);

result=(2+interm)*(1+result*result);




return result;
}
can u help me to write "dfunc(Vec_I_DP &x, Vec_O_DP &df) ":)


Thanks for your answers

M.

kutta
11-07-2007, 06:03 AM
hi!
I'm using the multidimensional conjugate gradient method to find a function minima.

My function is so defined :
DP func(Vec_I_DP &x)

{
double result;
double pi=3.1416;
double interm;



result=cos(pi*(1-exp(-x[0]*(1+0.4/0.25*(x[1]-0.5)*(x[1]-0.5)))));
interm = pow((x[1]-0.5), 4);

result=(2+interm)*(1+result*result);




return result;
}
can u help me to write "dfunc(Vec_I_DP &x, Vec_O_DP &df) ":)


Thanks for your answers

M.
Hello Lolita,
Pl try and make a method using the vector creation as shown in the enclosed file,as the same may be useful for your solution.This is only an example that you can alter your program.
Hope this suffices your immediate quest for the answer.Thanks:o
As Always
C.R.Muthukumar

lolita
11-07-2007, 07:13 AM
Hello kutta:o:)
Thanks for your answers
lolita