Newton's method for multivariate optimization in matlab
How to compute the gradient and hessian matrix when the equation cannot be solved numerically?
My minimization equation is:
c=c[(x/y/(1-x)^2)^0.6 + (1-(x/y)/(1-y)^2)^0.6 + 6/y^0
I tried the MATLAB function "diff" to compute the gradient and hessian. 开发者_如何学编程But derivations are much longer than one can handle. How to write the code for computing the hessian or gradient?
Why do you say the equation cannot be solved numerically? Do you mean it cannot be solved analytically? There appears to be a typo in your statement of the function c that you wish to optimize. When you refer to your use of Matlab's diff() function, do you mean that you evaluated your function on a grid and then differenced it? Or are you talking about passing a function handle to Matlab's symbolic library?
精彩评论