how to do jacobian matrix in matlab code example Example: calculate jacobian with matlab syms x y z jacobian([x*y*z, y^2, x + z], [x, y, z])