2011b可用syms x1 x2f = x1^2+x2^2gradient(f)2009a以下,可用syms x1 x2f = x1^2+x2^2[diff(f,x1);diff(f,x2)]
syms xy=(x^2)/2-log(x)grady=jacobian(y)x是n维向量是不合适