matlab计算hessian矩阵

代码如下;

syms x y z;
f1=(x^2-2*x)*exp(-x^2-y^2-x*y);
% f = x*y + 2*z*x;
% hessian(f,[x,y,z])
S=jacobian(gradient(f1));
pretty(S)

你可能感兴趣的:(Matlab)