jacobian - Jacobian matrix

Syntax

jacobian(f,v)

Description

jacobian(f,v) computes the Jacobian of the scalar or vector f with respect to v. The (i,j)-th entry of the result is . Note that when f is scalar, the Jacobian of f is the gradient of f. Also, note that v can be a scalar, although in that case the result is the same as diff(f,v).

Examples

The statements

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

return

R =
[y*z, x*z, x*y]
[  0,   1,   0]
[  1,   0,   1]

b =
[1, 0, 1]

See Also

diff

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS