对于符号导数函数diffdiff(f,var,n) f为要求导的表达式,var为求导的变量,n为阶数举个例子>> syms x y>> f=sin(x)*exp(x^2)+x^3*y^2f =x^3*y^2 + exp(x^2)*sin(x)>> diff(f,x,2)ans =exp(x^2)*sin(x) + 6*x*y^2 + 4*x^2*exp(x^2)*sin(x) + 4*x*exp(x^2)*cos(x)