相关代码 |
|
function [y,grad]=target(x) y=(x(1)*x(3)*(1+x(5))+x(2)*x(4)*(1+31.5/x(5)))/(2*cos(x(6))); grad=[x(3)*(1+x(5)),x(4)*(1+31.5/x(5)),x(1)*(1+x(5)),x(2)*(1+31.5/x(5)),x(1)*x(3)+x(4)/(1+31.5/x(5))^2,(x(1)*x(3)*(1+x(5))+x(2)*x(4)*(1+31.5/x(5)))/(2*cos(x(6)))*(-tan(x(6)))]/(2*cos(x(6)));
相关资源 |
|