annotate main/optim/inst/dcdp.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>
6992
45a51449b113 - leasqr.m:
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.
6992
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
12 %%
9930
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 prt = dcdp (f, p, dp, func[, bounds])
6992
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
17 %%
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
18 %% This is an interface to __dfdp__.m, similar to dfdp.m, but for
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
19 %% functions only of parameters 'p', not of independents 'x'. See
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
20 %% dfdp.m.
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
21 %%
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
22 %% dfpdp is more general and is meant to be used instead of dcdp in
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
23 %% optimization.
6992
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
24
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
25 function prt = dcdp (f, p, dp, func, bounds)
6992
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
26
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
27 if (ischar (func))
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
28 func = str2func (func);
6992
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
29 end
45a51449b113 - leasqr.m:
i7tiol
parents:
diff changeset
30
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
31 hook.f = f;
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
32
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
33 if (nargin > 4)
7842
4f1f5a78b8ed Allow named parameters to be arrays. Split bounds setting to lower and upper bounds.
i7tiol
parents: 7684
diff changeset
34 hook.lbounds = bounds(:, 1);
4f1f5a78b8ed Allow named parameters to be arrays. Split bounds setting to lower and upper bounds.
i7tiol
parents: 7684
diff changeset
35 hook.ubounds = bounds(:, 2);
7684
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
36 end
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
37
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
38 hook.diffp = abs (dp);
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
39 hook.fixed = dp == 0;
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
40 hook.diff_onesided = dp < 0;
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
41
d4f8cb9c7a93 Added nonlin_residmin and nonlin_curvefit with a common backend with leasqr.
i7tiol
parents: 6992
diff changeset
42 prt = __dfdp__ (p, func, hook);
9930
d30cfca46e8a optim: upgrade license to GPLv3+ and mention on DESCRIPTION the other package licenses
carandraug
parents: 7951
diff changeset
43 end