The problem i have finally found is that the estimations of x[0] and x[1] that are being improved with every call of rosen, are not getting sent to rosen as the latest x's but always the original x...
Type: Posts; User: a.mlw.walker
The problem i have finally found is that the estimations of x[0] and x[1] that are being improved with every call of rosen, are not getting sent to rosen as the latest x's but always the original x...
Yeah its there, nine lines down. but im still getting math errors and its definately on the line:
x_coeff = (exp(x[0]*2*pi)-cosh(x[0]*x[1]*Actual_Output[0]))/sinh(x[0]*x[1]*Actual_Output[0]);
...
OK thanks, I'll do that, however could you please confirm whether the functions i pasted above are doing what i think they are doing. My job is programming in Matlab however for this task i am...
Yeah i had inititalised it.
the problem is the function i have shown you is sent by main to another function to do a downhill simplex method on.
The function i have been showing you is in full
...
I am trying to return the error so since posting that i have
for (i = 0; i <= 4; i++)
{
c[i] = -1/atanh((exp(x[0]*2*pi)-cosh(x[0]*x[1]*Actual_Output[i]))/sinh(x[0]*x[1]*Actual_Output[i]));
...
I have the following function that is being called from an algorithm.
double rosen(double x[])
{
return (100*(x[1]-x[0]*x[0])*(x[1]-x[0]*x[0])+(1.0-x[0])*(1.0-x[0]));
}
however I have...