annotate main/optim/inst/dfxpdp.m @ 9930:d30cfca46e8a octave-forge

optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
author carandraug
date Fri, 30 Mar 2012 15:14:48 +0000
parents b0fc599dcdb1
children fba8cdd5f9ad
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7951
b0fc599dcdb1 Update copyright notices of functions for 'subpackage' nonlin_residmin.
i7tiol
parents: 7842
diff changeset
1 %% Copyright (C) 2010, 2011 Olaf Till <olaf.till@uni-jena.de>
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
2 %%
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
3 %% This program is free software; you can redistribute it and/or modify it under
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
4 %% the terms of the GNU General Public License as published by the Free Software
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
5 %% Foundation; either version 3 of the License, or (at your option) any later
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
6 %% version.
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
7 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
8 %% This program is distributed in the hope that it will be useful, but WITHOUT
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
9 %% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
10 %% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
11 %% details.
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
12 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
13 %% You should have received a copy of the GNU General Public License along with
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
14 %% this program; if not, see <http://www.gnu.org/licenses/>.
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
15
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
16 %% function jac = dfxpdp (x, p, func[, hook])
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
17 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
18 %% Returns Jacobian of func (p, x) with respect to p with finite
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
19 %% differencing. The optional argument hook is a structure which can
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
20 %% contain the following fields at the moment:
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
21 %%
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
22 %% hook.f: value of func(p, x) for p and x as given in the arguments
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
23 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
24 %% hook.diffp: positive vector of fractional steps from given p in
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
25 %% finite differencing (actual steps may be smaller if bounds are
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
26 %% given). The default is .001 * ones (size (p));
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
27 %%
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
28 %% hook.diff_onesided: logical vector, indexing elements of p for
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
29 %% which only one-sided differences should be computed (faster); even
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
30 %% if not one-sided, differences might not be exactly central if
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
31 %% bounds are given. The default is false (size (p)).
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
32 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
33 %% hook.fixed: logical vector, indexing elements of p for which zero
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
34 %% should be returned instead of the guessed partial derivatives
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
35 %% (useful in optimization if some parameters are not optimized, but
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
36 %% are 'fixed').
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
37 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
38 %% hook.lbound, hook.ubound: vectors of lower and upper parameter
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
39 %% bounds (or -Inf or +Inf, respectively) to be respected in finite
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
40 %% differencing. The consistency of bounds is not checked.
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
41
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
42 function ret = dfxpdp (varargin)
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
43
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
44 %% This is an interface to __dfdp__.m.
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
45
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
46 if (ischar (varargin{3}))
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
47 varargin{3} = @ (p) str2func (varargin{3}) ...
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
48 (p, varargin{1});
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
49 else
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
50 varargin{3} = @ (p) varargin{3} (p, varargin{1});
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
51 end
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
52
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents:
diff changeset
53 ret = __dfdp__ (varargin{2:end});
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
54
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
55 end