Rev | Line | |
---|
[37] | 1 | function dfdx = jacobian(f,x) |
---|
| 2 | % JACOBIAN Jacobian of scalar or vector |
---|
| 3 | % |
---|
| 4 | % J = JACOBIAN(p) Jacobian w.r.t all variables in p |
---|
| 5 | % J = JACOBIAN(p,x) Jacobian w.r.t the SDPVAR variables x |
---|
| 6 | % |
---|
| 7 | % See also SDPVAR, HESSIAN, LINEARIZE |
---|
| 8 | |
---|
| 9 | % Author Johan Löfberg |
---|
| 10 | % $Id: jacobian.m,v 1.1 2004/09/15 08:48:21 johanl Exp $ |
---|
| 11 | |
---|
| 12 | switch nargin |
---|
| 13 | case 1 |
---|
| 14 | dfdx = shadowjacobian(f); |
---|
| 15 | case 2 |
---|
| 16 | dfdx = shadowjacobian(f,x); |
---|
| 17 | otherwise |
---|
| 18 | error('Too many input arguments.'); |
---|
| 19 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.