Hello everyone,
I really need some help.
I have reached the limit of my knowledge about OX. I have written the
following program, which takes a function and tell you its maximum.
# include <oxstd.h> #import <maximize>
func(const vP, const adFunc, const avScore, const amHessian){ decl W, v, u;
adFunc[0] = -100 * (vP[1] - vP[0] ^ 2) ^ 2 - (1 - vP[0]) ^ 2;
print (" W = ", adFunc[0], " "); return 1;
}
main(){
decl vp, dfunc, ir;
MaxControl(50000, 1);
vp = zeros(2, 1); // starting values
ir = MaxBFGS(func, &vp, &dfunc, 0, TRUE);
print("\n", MaxConvergenceMsg(ir), " using numerical
derivatives", "\nFunction value = ", dfunc, ";
parameters:",vp);
}
Know i need a way to either do it without knowing the Zeroes, or a way
to find the Zeroes?
It is very important that the program is able to solve different
equations. I look forward to your fast response.
|