Mercurial > forge
diff main/optim/inst/dfdp.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 |
line wrap: on
line diff
--- a/main/optim/inst/dfdp.m Fri Mar 30 15:02:12 2012 +0000 +++ b/main/optim/inst/dfdp.m Fri Mar 30 15:14:48 2012 +0000 @@ -3,43 +3,43 @@ %% Copyright (C) 1992-1994 Ray Muzic %% Copyright (C) 2010, 2011 Olaf Till <olaf.till@uni-jena.de> %% -%% This program is free software; you can redistribute it and/or modify -%% it under the terms of the GNU General Public License as published by -%% the Free Software Foundation; either version 2 of the License, or -%% (at your option) any later version. +%% This program is free software; you can redistribute it and/or modify it under +%% the terms of the GNU General Public License as published by the Free Software +%% Foundation; either version 3 of the License, or (at your option) any later +%% version. +%% +%% This program is distributed in the hope that it will be useful, but WITHOUT +%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +%% details. %% -%% This program is distributed in the hope that it will be useful, -%% but WITHOUT ANY WARRANTY; without even the implied warranty of -%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -%% GNU General Public License for more details. +%% You should have received a copy of the GNU General Public License along with +%% this program; if not, see <http://www.gnu.org/licenses/>. + +%% function prt = dfdp (x, f, p, dp, func[, bounds]) +%% numerical partial derivatives (Jacobian) df/dp for use with leasqr +%% --------INPUT VARIABLES--------- +%% x=vec or matrix of indep var(used as arg to func) x=[x0 x1 ....] +%% f=func(x,p) vector initialsed by user before each call to dfdp +%% p= vec of current parameter values +%% dp= fractional increment of p for numerical derivatives +%% dp(j)>0 central differences calculated +%% dp(j)<0 one sided differences calculated +%% dp(j)=0 sets corresponding partials to zero; i.e. holds p(j) fixed +%% func=function (string or handle) to calculate the Jacobian for, +%% e.g. to calc Jacobian for function expsum prt=dfdp(x,f,p,dp,'expsum') +%% bounds=two-column-matrix of lower and upper bounds for parameters +%% If no 'bounds' options is specified to leasqr, it will call +%% dfdp without the 'bounds' argument. +%%----------OUTPUT VARIABLES------- +%% prt= Jacobian Matrix prt(i,j)=df(i)/dp(j) +%%================================ %% -%% You should have received a copy of the GNU General Public License -%% along with this program; If not, see <http://www.gnu.org/licenses/>. +%% dfxpdp is more general and is meant to be used instead of dfdp in +%% optimization. function prt = dfdp (x, f, p, dp, func, bounds) - %% function prt = dfdp (x, f, p, dp, func[, bounds]) - %% numerical partial derivatives (Jacobian) df/dp for use with leasqr - %% --------INPUT VARIABLES--------- - %% x=vec or matrix of indep var(used as arg to func) x=[x0 x1 ....] - %% f=func(x,p) vector initialsed by user before each call to dfdp - %% p= vec of current parameter values - %% dp= fractional increment of p for numerical derivatives - %% dp(j)>0 central differences calculated - %% dp(j)<0 one sided differences calculated - %% dp(j)=0 sets corresponding partials to zero; i.e. holds p(j) fixed - %% func=function (string or handle) to calculate the Jacobian for, - %% e.g. to calc Jacobian for function expsum prt=dfdp(x,f,p,dp,'expsum') - %% bounds=two-column-matrix of lower and upper bounds for parameters - %% If no 'bounds' options is specified to leasqr, it will call - %% dfdp without the 'bounds' argument. - %%----------OUTPUT VARIABLES------- - %% prt= Jacobian Matrix prt(i,j)=df(i)/dp(j) - %%================================ - %% - %% dfxpdp is more general and is meant to be used instead of dfdp in - %% optimization. - %% This is just an interface. The original code has been moved to %% __dfdp__.m, which is used with two different interfaces by %% leasqr.m.