From dbe05bd9c811e59dfed26530ddbb16e59a9223d2 Mon Sep 17 00:00:00 2001 From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152> Date: Fri, 1 Aug 2008 13:28:14 +0000 Subject: [PATCH] v4 matlab: added copyright notice to C. Sims' files git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1976 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/bfgsi.m | 20 ++++++++++++++++++-- matlab/bvar_density.m | 2 +- matlab/bvar_toolbox.m | 2 +- matlab/csminit.m | 17 +++++++++++++++++ matlab/csminwel.m | 18 ++++++++++++++++++ matlab/csolve.m | 18 ++++++++++++++++++ matlab/numgrad.m | 17 +++++++++++++++++ matlab/numgrad3.m | 1 + matlab/numgrad5.m | 2 +- matlab/qz/qzdiv.m | 21 +++++++++++++++++---- matlab/qz/qzswitch.m | 24 +++++++++++++++++++----- 11 files changed, 128 insertions(+), 14 deletions(-) diff --git a/matlab/bfgsi.m b/matlab/bfgsi.m index be2ef0e4f6..1f6546477d 100644 --- a/matlab/bfgsi.m +++ b/matlab/bfgsi.m @@ -3,8 +3,24 @@ function H = bfgsi(H0,dg,dx) % dg is previous change in gradient; dx is previous change in x; % 6/8/93 version that updates inverse hessian instead of hessian % itself. -% Copyright by Christopher Sims 1996. This material may be freely -% reproduced and modified. + +% Copyright (C) 1993-2007 Christopher Sims +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + if size(dg,2)>1 dg=dg'; end diff --git a/matlab/bvar_density.m b/matlab/bvar_density.m index 245b72b8f6..a3699c2251 100644 --- a/matlab/bvar_density.m +++ b/matlab/bvar_density.m @@ -11,7 +11,7 @@ function bvar_density(maxnlags) % SPECIAL REQUIREMENTS % none -% Copyright (C) 2003-2007 Chris Sims +% Copyright (C) 2003-2007 Christopher Sims % Copyright (C) 2007 Dynare Team % % This file is part of Dynare. diff --git a/matlab/bvar_toolbox.m b/matlab/bvar_toolbox.m index 17d203ca75..cd4c115271 100644 --- a/matlab/bvar_toolbox.m +++ b/matlab/bvar_toolbox.m @@ -41,7 +41,7 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags) % - datafile, first_obs, varobs, xls_sheet, xls_range, nobs, presample % - bvar_prior_{tau,decay,lambda,mu,omega,flat,train} -% Copyright (C) 2003-2007 Chris Sims +% Copyright (C) 2003-2007 Christopher Sims % Copyright (C) 2007-2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/csminit.m b/matlab/csminit.m index 75bf46d6ae..bc02c06204 100644 --- a/matlab/csminit.m +++ b/matlab/csminit.m @@ -15,7 +15,24 @@ function [fhat,xhat,fcount,retcode] = csminit(fcn,x0,f0,g0,badg,H0,varargin) % % Fixed 7/19/93 to flip eigenvalues of H to get better performance when % it's not psd. + +% Copyright (C) 1993-2007 Christopher Sims % +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + %tailstr = ')'; %for i=nargin-6:-1:1 % tailstr=[ ',P' num2str(i) tailstr]; diff --git a/matlab/csminwel.m b/matlab/csminwel.m index 2f0cf53483..516c5e7dca 100644 --- a/matlab/csminwel.m +++ b/matlab/csminwel.m @@ -18,6 +18,24 @@ function [fh,xh,gh,H,itct,fcount,retcodeh] = csminwel(fcn,x0,H0,grad,crit,nit,me % hessian update, respectively. (When the routine hits certain kinds of difficulty, it % write g2.mat and g3.mat as well. If all were written at about the same time, any of them % may be a decent starting point. One can also start from the one with best function value.) + +% Copyright (C) 1993-2007 Christopher Sims +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + global bayestopt_ fh = []; xh = []; diff --git a/matlab/csolve.m b/matlab/csolve.m index e6400b830b..6a7dbf334f 100644 --- a/matlab/csolve.m +++ b/matlab/csolve.m @@ -17,6 +17,24 @@ function [x,rc] = csolve(FUN,x,gradfun,crit,itmax,varargin) % rc: 0 means normal solution, 1 and 3 mean no solution despite extremely fine adjustments % in step length (very likely a numerical problem, or a discontinuity). 4 means itmax % termination. + +% Copyright (C) 1993-2007 Christopher Sims +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + %---------- delta -------------------- % differencing interval for numerical gradient delta = 1e-6; diff --git a/matlab/numgrad.m b/matlab/numgrad.m index e6076017bf..317577e3d8 100644 --- a/matlab/numgrad.m +++ b/matlab/numgrad.m @@ -1,6 +1,23 @@ function [g, badg] = numgrad(fcn,x,varargin) % function [g badg] = numgrad(fcn,xvarargin) + +% Copyright (C) 1993-2007 Christopher Sims % +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + delta = 1e-6; %delta=1e-2; n=length(x); diff --git a/matlab/numgrad3.m b/matlab/numgrad3.m index e1203536ea..f79ab7f075 100644 --- a/matlab/numgrad3.m +++ b/matlab/numgrad3.m @@ -7,6 +7,7 @@ function [g, badg, f0, f1, f2] = numgrad3(fcn,x,varargin) % See section 25.3.4 in Abramovitz and Stegun (1972, Tenth Printing, December) Handbook of Mathematical Functions. % http://www.math.sfu.ca/~cbm/aands/ +% Copyright (C) 1993-2007 Christopher Sims % Copyright (C) 2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/numgrad5.m b/matlab/numgrad5.m index 8ff0ef3bae..c93e0a0fd7 100644 --- a/matlab/numgrad5.m +++ b/matlab/numgrad5.m @@ -8,8 +8,8 @@ function [g, badg, f0, f1, f2, f3, f4] = numgrad5(fcn,x,varargin) % http://www.math.sfu.ca/~cbm/aands/ % % TODO Try Four points formula when cost_flag3=0 or cost_flag4=0. -% +% Copyright (C) 1993-2007 Christopher Sims % Copyright (C) 2008 Dynare Team % % This file is part of Dynare. diff --git a/matlab/qz/qzdiv.m b/matlab/qz/qzdiv.m index 9ea24723b1..5f1a0fd95e 100644 --- a/matlab/qz/qzdiv.m +++ b/matlab/qz/qzdiv.m @@ -1,7 +1,3 @@ -% from Chris Sims web site -% http://eco-072399b.princeton.edu/yftp/gensys/mfiles/QZDIV.M -% - function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) %function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) % @@ -9,7 +5,24 @@ function [A,B,Q,Z] = qzdiv(stake,A,B,Q,Z) % so that all cases of abs(B(i,i)/A(i,i))>stake are in lower right % corner, while preserving U.T. and orthonormal properties and Q'AZ' and % Q'BZ'. + +% Copyright (C) 1993-2007 Christopher Sims +% +% This file is part of Dynare. % +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + [n jnk] = size(A); root = abs([diag(A) diag(B)]); root(:,1) = root(:,1)-(root(:,1)<1.e-13).*(root(:,1)+root(:,2)); diff --git a/matlab/qz/qzswitch.m b/matlab/qz/qzswitch.m index 350fc9f160..72bf41574d 100644 --- a/matlab/qz/qzswitch.m +++ b/matlab/qz/qzswitch.m @@ -1,7 +1,3 @@ -% from Chris Sims web site -% http://eco-072399b.princeton.edu/yftp/gensys/mfiles/QZSWITCH.M -% - function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) %function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) % @@ -13,7 +9,25 @@ function [A,B,Q,Z] = qzswitch(i,A,B,Q,Z) % to drive all zeros on the diagonal of A to the lower right, but in this case % the qz transformation is not unique and it is not possible simply to switch % the positions of the diagonal elements of both A and B. - realsmall=sqrt(eps)*10; + +% Copyright (C) 1993-2007 Christopher Sims +% +% This file is part of Dynare. +% +% Dynare 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. +% +% Dynare 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 Dynare. If not, see <http://www.gnu.org/licenses/>. + +realsmall=sqrt(eps)*10; %realsmall=1e-3; a = A(i,i); d = B(i,i); b = A(i,i+1); e = B(i,i+1); c = A(i+1,i+1); f = B(i+1,i+1); -- GitLab