Documentation Center

  • Trial Software
  • Product Updates

jacobian

Jacobian matrix

Syntax

jacobian(f,v)

Description

jacobian(f,v) computes the Jacobian matrix of the scalar or vector f with respect to v. The (i, j)-th entry of the result is . If f is a scalar, the Jacobian matrix of f is the gradient of f. If v is a scalar, the result equals to diff(f, v).

Examples

Compute the Jacobian matrix for each of these vectors:

syms x y z
f = [x*y*z; y; x + z];
v = [x, y, z];        
R = jacobian(f, v)
b = jacobian(x + z, v)
R =
[ y*z, x*z, x*y]
[   0,   1,   0]
[   1,   0,   1]
 
b =
[ 1, 0, 1]

See Also

| | | | | | |

Was this topic helpful?