diff --git a/MatlabFiles/a0asfun.m b/MatlabFiles/a0asfun.m
index 6d8cb55972046d28f91e860a470ca85c1f46127d..5054ea5f1c20ab121f1be6f547fc60076a73a0ee 100644
--- a/MatlabFiles/a0asfun.m
+++ b/MatlabFiles/a0asfun.m
@@ -10,7 +10,22 @@ function of = a0asfun(x,s,nobs,nvar,a0indx)
 %                    to an equation)
 %
 % Copyright (c) December 1997 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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/>.
 
 a0 = zeros(nvar);
 a0(a0indx) = x;
diff --git a/MatlabFiles/a0asgrad.m b/MatlabFiles/a0asgrad.m
index 2d76d221c0a0e163f572fd3baa522d7e5164383a..581b85aec71120b212ca96e50100eaf198cee45a 100644
--- a/MatlabFiles/a0asgrad.m
+++ b/MatlabFiles/a0asgrad.m
@@ -8,7 +8,22 @@ function [g,badg] = a0asgrad(x,s,nobs,nvar,a0indx);
 %  nvar (no of variables),
 %  a0indx (matrix indicating the free parameters in A0, and each column in A0 corresponds
 %                    to an equation)
-
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 a0 = zeros(nvar);
 %%g = zeros(nvar*nvar,1);     % 4/27/97: not necessary.
diff --git a/MatlabFiles/a0freefun.m b/MatlabFiles/a0freefun.m
index 8e322b933c3f6b41b230768665d18abaf80ffa07..d625e40a9bc2af3c15c431c82bafbc3ac66d6372 100644
--- a/MatlabFiles/a0freefun.m
+++ b/MatlabFiles/a0freefun.m
@@ -20,6 +20,22 @@ function of = a0freefun(b,Ui,nvar,n0,fss,H0inv)
 % of:  objective function (negative logPosterior)
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 b=b(:);
 
diff --git a/MatlabFiles/a0freegrad.m b/MatlabFiles/a0freegrad.m
index b807e782719814de309d04ed1e8359304368b601..7f1255156e5470e6e7292980f2c9bcf661054769 100644
--- a/MatlabFiles/a0freegrad.m
+++ b/MatlabFiles/a0freegrad.m
@@ -19,6 +19,22 @@ function [g,badg] = a0freegrad(b,Ui,nvar,n0,fss,H0inv)
 % badg: 0, the value that is used in csminwel.m
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 b=b(:);
 
diff --git a/MatlabFiles/a0impsmp.m b/MatlabFiles/a0impsmp.m
index 6a3c06b90e9bc2e393902e9b833239af1db5c7fe..d3b1a92c101901e3b7d6ef987e33a0a0b8895ef1 100644
--- a/MatlabFiles/a0impsmp.m
+++ b/MatlabFiles/a0impsmp.m
@@ -31,6 +31,22 @@ function [xdraw,mphv,sm,timeminutes] = a0impsmp(xinput)
 % sm:   sum of the weights
 %
 % Written by Tao Zha 1999
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nfp=xinput{1}; nvar=xinput{2}; xhat=xinput{3}; hess1=xinput{4}; Indxv=xinput{5};
 imndraws=xinput{6}; a0indx=xinput{7}; tdf=xinput{8}; nbuffer=xinput{9};
diff --git a/MatlabFiles/a0lhfun.m b/MatlabFiles/a0lhfun.m
index 93e3fd3b5158530dabfb058b0f9327f8b4d5a560..a4f7e824af3afab2ef99c2bff69f06bc513fc594 100644
--- a/MatlabFiles/a0lhfun.m
+++ b/MatlabFiles/a0lhfun.m
@@ -10,6 +10,23 @@ function of = a0lhfun(x,s,nobs,nvar,a0indx)
 %  a0indx (matrix indicating the free parameters in A0, and each column in A0 corresponds
 %                    to an equation)
 % written by Eric Leeper
+% Copyright (C) 1997-2012 Eric Leeper
+%
+% 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/>.
+
 
 a0 = zeros(nvar);
 a0(a0indx) = x;
diff --git a/MatlabFiles/a0lhgh.m b/MatlabFiles/a0lhgh.m
index 4fa7e40594c7ae13988bd5c25a46f83e4ab3a039..42390d267bc3ac86108040198fee0e9140cb3e02 100644
--- a/MatlabFiles/a0lhgh.m
+++ b/MatlabFiles/a0lhgh.m
@@ -7,7 +7,22 @@ function g = a0lhgh(x0,s,nobs,nvar,a0indx);
 %  nvar (no of variables),
 %  a0indx (matrix indicating the free parameters in A0, and each column in A0 corresponds
 %                    to an equation)
-
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %%a = zeros(nvar*nvar,1);
 a = zeros(nvar);
diff --git a/MatlabFiles/a0lhgrad.m b/MatlabFiles/a0lhgrad.m
index 5bf5859f736f09afe472fe989e32f8fafd01806a..4f5478b1331fb1b3e28232546da099200855ac1c 100644
--- a/MatlabFiles/a0lhgrad.m
+++ b/MatlabFiles/a0lhgrad.m
@@ -9,7 +9,22 @@ function [g,badg] = a0lhgrad(x0,s,nobs,nvar,a0indx);
 %                    to an equation)
 %
 % Written by Tao Zha
-
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %%a = zeros(nvar*nvar,1);
 a = zeros(nvar);
diff --git a/MatlabFiles/a0onlysim.m b/MatlabFiles/a0onlysim.m
index 91c3e1b5d1841c5640efb2cf6920d54c8f1abb3e..b152bedc9e5404b38a3e88aa911a332a1ead7436 100644
--- a/MatlabFiles/a0onlysim.m
+++ b/MatlabFiles/a0onlysim.m
@@ -39,6 +39,22 @@ function [xdraw,timeminutes,nswitch] = a0onlysim(xinput)
 % timeminutes:  minutes used for this simulation
 %
 % Written by Tao Zha 1999
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nfp=xinput{1}; nvar=xinput{2}; xhat=xinput{3}; hess=xinput{4}; Indxv=xinput{5};
 IndxGraph=xinput{6}; idmat0=xinput{7}; nstarts=xinput{8}; ndraws1=xinput{9}; ndraws2=xinput{10};
diff --git a/MatlabFiles/adapt.m b/MatlabFiles/adapt.m
index 1ea5a2e110ecde237508d61d10152bacf5d54d28..1f8ba86a753062ea6895c3b76f49995415326404 100644
--- a/MatlabFiles/adapt.m
+++ b/MatlabFiles/adapt.m
@@ -18,10 +18,22 @@ function Q = adapt(f,a,b,tol,trace,varargin)
 %
 %   See also QUAD, QUAD8, DBLQUAD.
 
-%   Copyright (c) 1990-97 by The MathWorks, Inc.
-%   $Revision: 1.0 $  $Date: 1997/09/15 14:36:41 $
-%   Author: Walter Gander 5-20-97
-%   Reference: Computermathematik, Birkhaeuser, 1992.
+%  % Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin < 4), tol = []; end;
 if (nargin < 5), trace = []; end;
diff --git a/MatlabFiles/adaptstp.m b/MatlabFiles/adaptstp.m
index 846750a7bf2f6cae661959b00abc69bed4a4e69e..6075b7993bfeda37e7d82e1aa1944c02772c28e6 100644
--- a/MatlabFiles/adaptstp.m
+++ b/MatlabFiles/adaptstp.m
@@ -10,6 +10,22 @@ function Q = adaptstp (f, a, b, fa, fm, fb, is, trace, varargin)
 %   See also ADAPT.
 
 %   Author: Walter Gander, 05/20/97
+% Copyright (C) 1997 Walter Gander
+%
+% 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/>.
 
 m = (a + b)/2; h = (b - a)/4;
 x = [a + h, b - h];
diff --git a/MatlabFiles/betapar.m b/MatlabFiles/betapar.m
index 200b3cbae9e66788a628cebcddb363264c1d63c8..e79604d42cf4cf770ca311c7369c0da93ec62efc 100644
--- a/MatlabFiles/betapar.m
+++ b/MatlabFiles/betapar.m
@@ -3,6 +3,22 @@ function f = betapar(ab, XLO, XUP, PLO, PUP);
 % The function takes as inputs the parameters ab=[a, b] of the Beta 
 % distribution, the bounds of the support [XLO, XUP], the the corresponding 
 % probability of the bounds [PLO, PUP] and returns the residual value f.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 a = ab(1); b = ab(2);
 f1 = PLO - betacdf(XLO, a, b);
diff --git a/MatlabFiles/bfgsi.m b/MatlabFiles/bfgsi.m
index aa87285a7335dc15887496c89931de791bf121c4..b56fe3662be6d5ec4dc88906c886cdc072e78e5e 100644
--- a/MatlabFiles/bfgsi.m
+++ b/MatlabFiles/bfgsi.m
@@ -5,6 +5,23 @@ function H = bfgsi(H0,dg,dx)
 % itself.
 % Copyright by Christopher Sims 1996.  This material may be freely
 % reproduced and modified.
+
+% Copyright (C) 1996 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/>.
 dispIndx = 1;   % 1: turn on all the diplays on the screen; 0: turn off (Added by T. Zha)
 
 if size(dg,2)>1
diff --git a/MatlabFiles/binread.m b/MatlabFiles/binread.m
index 1f5d1fa9833689c8fc0aa05fc71dba9130f7923e..d9f6c930b9466a5d07336ea27a88c8ec06566857 100644
--- a/MatlabFiles/binread.m
+++ b/MatlabFiles/binread.m
@@ -1,3 +1,19 @@
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 nbuffer = 10;
 ndraws=3*nbuffer;
 
diff --git a/MatlabFiles/binwrite.m b/MatlabFiles/binwrite.m
index 9912e5f04fd9ca4b4691b8c0d7a6efba19841dca..20e46d64baaa062bfb321406fca8b2af9de2dd38 100644
--- a/MatlabFiles/binwrite.m
+++ b/MatlabFiles/binwrite.m
@@ -1,3 +1,19 @@
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 nbuffer = 10;
 ndraws=3*nbuffer;
 
diff --git a/MatlabFiles/calyrqm.m b/MatlabFiles/calyrqm.m
index 21119915a2eb118c7c39d590e61fa42ebad8ebdd..5c94aa34feb37157e794b8ca804646cd1ed6c599 100644
--- a/MatlabFiles/calyrqm.m
+++ b/MatlabFiles/calyrqm.m
@@ -12,6 +12,22 @@ function [Myrqm,nMyrqm] = calyrqm(q_m,Byrqm,Eyrqm)
 % nMyrqm:  number of data points incl. Byrqm and Eyrqm
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 ~isempty(find(Byrqm-round(Byrqm))) | (q_m-round(q_m)) | ~isempty(find(Byrqm-round(Byrqm)))
    error('argin qm, Byrqm, or Eyrqm must of integer')
diff --git a/MatlabFiles/cfore.m b/MatlabFiles/cfore.m
index b9fa1a1306ef2da206b83d13730a8cbc0b52629c..c3e06510aa2a4edaf39eb6cd465fa8f619dbc1dc 100644
--- a/MatlabFiles/cfore.m
+++ b/MatlabFiles/cfore.m
@@ -2,7 +2,22 @@
 % Distance Method of Waggoner and Zha
 % Modified from Sims and Zha's code
 % Copyright (c) 1997 Tao Zha
-
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** ONLY UNDER UNIX SYSTEM
 %path(path,'/usr2/f1taz14/mymatlab')
diff --git a/MatlabFiles/chol2.m b/MatlabFiles/chol2.m
index 89395bab7c68bc3e9f4dc996616d5402911efc29..619c829f0b00e132bd3de4a359ac10514dfee09a 100644
--- a/MatlabFiles/chol2.m
+++ b/MatlabFiles/chol2.m
@@ -5,6 +5,22 @@ function R = chol2(A)
 %           a symmetric, positive definite A
 %
 % Written by Tao Zha, July 1996
+% Copyright (C) 1996-2012 Tao Zha
+%
+% 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/>.
 
 %* The following two lines give another expression of the same result
 %%function [R,p] = chol2(A)
diff --git a/MatlabFiles/clgls.m b/MatlabFiles/clgls.m
index fa150e9fe5679f4fddb15a0c432a92f1f0ba1533..b6bf9c63db99d157af3529185aa802660e3ab185 100644
--- a/MatlabFiles/clgls.m
+++ b/MatlabFiles/clgls.m
@@ -7,6 +7,22 @@ function [bhat,Vq,ACt,uqhat,q2] = clgls(a,yq,Xq,C,qm,mT,qT)
 %
 % Written by E.M. Leeper
 % Modified by T. Zha, 5/6/97
+% Copyright (C) 1997-2012 Eric Leeper and Tao Zha
+%
+% 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/>.
 
 
 %*** The following creation of Ahat may be inefficient, T.Z., 5/7/97
diff --git a/MatlabFiles/clmonq.m b/MatlabFiles/clmonq.m
index 45c946036992180b8ace133ed805edd07efe04df..a0d86c98d196ade7c1dab65d6c5d6a524bdd46f7 100644
--- a/MatlabFiles/clmonq.m
+++ b/MatlabFiles/clmonq.m
@@ -4,6 +4,22 @@ function a = clmonq(q)
 %    an estimate of the quarterly AR coefficient
 %    Written by E.M. Leeper
 %
+% Copyright (C) 1997-2012 E. M. Leeper and Tao Zha
+%
+% 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/>.
 % First take the quarterly AR coefficient, q, and then
 %     seek the root, a, that solves
 %        q = (a^5 + 2 a^4 + 3 a^3 + 2 a^2 + a) / (2 a^2 + 4 a + 3)  (1)
diff --git a/MatlabFiles/contents.m b/MatlabFiles/contents.m
index f5531d6d6b517ed7b98c4d25c5399035577a1021..ae8be2ca59647a3a224bd1887d43173b3d77cd41 100644
--- a/MatlabFiles/contents.m
+++ b/MatlabFiles/contents.m
@@ -2,4 +2,20 @@
 % Vertion 1.1         March 1998
 % optimization, impulse, forecast, hessian, gradient
 %
-% Copyright (c) by Sims and Zha
\ No newline at end of file
+% Copyright (c) by Sims and Zha
+% Copyright (C) 1997-2012 Christopher Sims and Tao Zha
+%
+% 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/>.
\ No newline at end of file
diff --git a/MatlabFiles/csminit.m b/MatlabFiles/csminit.m
index b31acec82b4e51109fa0ea310eff325535726ab4..6f790c17b0dd1c04381be456e83e481e351b5de6 100644
--- a/MatlabFiles/csminit.m
+++ b/MatlabFiles/csminit.m
@@ -22,6 +22,22 @@ function [fhat,xhat,fcount,retcode] = csminit(fcn,x0,f0,g0,badg,H0,varargin)
 %for i=nargin-6:-1:1
 %   tailstr=[ ',P' num2str(i)  tailstr];
 %end
+% Copyright (C) 1997-2012  Christopher A. 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/>.
 
 dispIndx = 1;   % 1: turn on all the diplays on the screen; 0: turn off (Added by T. Zha)
 
diff --git a/MatlabFiles/csminitworksuntiil0205.m b/MatlabFiles/csminitworksuntiil0205.m
index 54b5603a1b0459e70823bb78b31f1dbf25333588..6e1e2805bcc9998db727d9f916b957034736d570 100644
--- a/MatlabFiles/csminitworksuntiil0205.m
+++ b/MatlabFiles/csminitworksuntiil0205.m
@@ -18,6 +18,23 @@ function [fhat,xhat,fcount,retcode] = csminit(fcn,x0,f0,g0,badg,H0,varargin)
 % NOTE:  The display on screen can be turned off by seeting dispIndx=0 in this
 %         function.  This option is used for the loop operation.  T. Zha, 2 May 2000
 
+% Copyright (C) 1997-2012 C. A. 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/>.
+
 dispIndx = 0;   % 1: turn on all the diplays on the screen; 0: turn off (Added by T. Zha)
 
 %
diff --git a/MatlabFiles/csminwel.m b/MatlabFiles/csminwel.m
index 2a954a802b4704c8ed833a8a6ca547b3ed75a0b5..04485eef2300d5f637314c98100d7a1b580e452e 100644
--- a/MatlabFiles/csminwel.m
+++ b/MatlabFiles/csminwel.m
@@ -19,6 +19,22 @@ function [fh,xh,gh,H,itct,fcount,retcodeh] = csminwel(fcn,x0,H0,grad,crit,nit,va
 % NOTE:  The display on screen can be turned off by seeting dispIndx=0 in this
 %         function.  This option is used for the loop operation.  T. Zha, 2 May 2000
 % NOTE:  You may want to change stps to 1.0e-02 or 1.0e-03 to get a better convergence.  August, 2006
+% Copyright (C) 1997-2012 Christopher Sims and Tao Zha
+%
+% 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/>.
 
 Verbose = 1;  % 1: turn on all the diplays on the screen; 0: turn off (Added by T. Zha)
 dispIndx = 1;   % 1: turn on all the diplays on the screen; 0: turn off (Added by T. Zha)
diff --git a/MatlabFiles/datactcon.m b/MatlabFiles/datactcon.m
index 6525ce59da2b0ee22c7a189e5750cb421324741a..fcc9b6492c9c31019ef407e2ef86526ecf290be3 100644
--- a/MatlabFiles/datactcon.m
+++ b/MatlabFiles/datactcon.m
@@ -33,6 +33,22 @@ function [yact,yactmg,yactqg,yactCalyg,yactCal] = datactcon(xinput)
 %
 % Copyright (c) March 1998 by Tao Zha
 % Revised, October 1998
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 xdata=xinput{1}; nSample=xinput{2}; nSampleCal=xinput{3};
diff --git a/MatlabFiles/dataext.m b/MatlabFiles/dataext.m
index b397a5a8729fd4cc652740433fb802f145e5cc89..1301c1c9b45f45683536407bc7228cbb111336d5 100644
--- a/MatlabFiles/dataext.m
+++ b/MatlabFiles/dataext.m
@@ -12,6 +12,23 @@ function [xdsube,Brow,Erow] = dataext(Byrqm,Eyrqm,xdatae)
 % Erow:  the row number in xdatee that marks the last row of xdsube.
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (Byrqm(2)==0) & (Eyrqm(2)~=0)
    error('If annual data, make sure both Byrqm(2) and Eyrqm(2) are zero')
diff --git a/MatlabFiles/datana.m b/MatlabFiles/datana.m
index 2f9b7c8aa927c778a532207b3122ca26154d8586..3d7052e3faaa9b655fb15b1de4921a3b5aae5e0a 100644
--- a/MatlabFiles/datana.m
+++ b/MatlabFiles/datana.m
@@ -22,6 +22,23 @@ function [yactyrge,yactyre,yactqmyge,yactqmge,yactqme] = datana(xdatae,q_m,vlist
 % yactqme:  logged data with dates in the first 2 columns.
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(xdatae,1)<2*q_m
    error('We need at least two years of xdatae to get annual rates.  Check xdatae!!')
diff --git a/MatlabFiles/dataxy.m b/MatlabFiles/dataxy.m
index a373d87d193333431cf037b433f150b76d34fac1..639e78d49f16ff4538e491e385738d2ec4f9f426 100644
--- a/MatlabFiles/dataxy.m
+++ b/MatlabFiles/dataxy.m
@@ -34,6 +34,23 @@ function [xtx,xty,yty,fss,phi,y,ncoef,xr,Bh,e] = dataxy(nvar,lags,z,mu,indxDummy
 % e:  estimated residual e = y -x*Bh,  T-by-nvar
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 5
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/demarcate.m b/MatlabFiles/demarcate.m
index 8c751dc7b2fadcf38fa34760a6accea58a20f8e9..c83940772b9976fee9329b7a1c58e3e5eed200ab 100644
--- a/MatlabFiles/demarcate.m
+++ b/MatlabFiles/demarcate.m
@@ -19,6 +19,23 @@ function [imfl,imfh,imfl1,imfh1] = demarcate(imfcnt,imndraws,forep,nvar,...
 % imfh1: higher .68 bound, forep-by-nvar
 %
 % Copyright (c) March 1998 Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 
diff --git a/MatlabFiles/demarw.m b/MatlabFiles/demarw.m
index 0a12997051323963af64a3d498610fb9014c35e2..f354059495b1273ae92563101200bf39452a93d6 100644
--- a/MatlabFiles/demarw.m
+++ b/MatlabFiles/demarw.m
@@ -11,6 +11,23 @@ function [imfl,imfh,imfl1,imfh1] = demarw(xpo,xprob)
 % imfh1: higher .68 bound, nvar-by-1
 %
 % Copyright (c) August 1999 Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 [ndraws,nvar]=size(xpo);
 
diff --git a/MatlabFiles/dlrpostr.m b/MatlabFiles/dlrpostr.m
index fd17d7888e17f7ba54678717ae917cebb88f4caf..52b7ba54cbbd0f6e22ba2d7d67de77a9cf0a9c8d 100644
--- a/MatlabFiles/dlrpostr.m
+++ b/MatlabFiles/dlrpostr.m
@@ -26,6 +26,23 @@ function [P,H0inv,Hpinv] = dlrpostr(xtx,xty,yty,Ui,Vi)
 % Hpinv: cell(nvar,1).  In each cell, posterior inv(Hp) for the ith equation.
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 nvar = size(yty,1);
 
diff --git a/MatlabFiles/eigsort.m b/MatlabFiles/eigsort.m
index 4a60b65d73d581e7bb01e361ca17b4cadd7abe56..771d7b0d7018be1fee38611648d575a4e99ffdbb 100644
--- a/MatlabFiles/eigsort.m
+++ b/MatlabFiles/eigsort.m
@@ -7,6 +7,22 @@ function [vU2,dU2] = eigsort(U,desI)
 %    that X*V = V*D.
 %
 % Written 9/6/98 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 [vU,dU]=eig(U);
 dUvec = diag(dU);   % If dU is SPD, use "abs" in front of diag.  This is because,
diff --git a/MatlabFiles/ellipse.m b/MatlabFiles/ellipse.m
index ab1215fe47d241f793eddccddc45b22a9ff7d734..5ef3f6b56a3fd0c5d7d3ff9b025afca3210c4a1d 100644
--- a/MatlabFiles/ellipse.m
+++ b/MatlabFiles/ellipse.m
@@ -23,6 +23,22 @@ function [x,y,z] = ellipse(sigma,mu,k)
 % department of the Federal Reserve Bank of Atlanta.
 % Original: August 19, 1997
 % Last Modified: August 19, 1997
+% Copyright (C) 1997-2012 Clark A. Burdick
+%
+% 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/>.
 
 % TO BE DONE:
 %      I'm open to suggestions.
diff --git a/MatlabFiles/empdfsort.m b/MatlabFiles/empdfsort.m
index 3cb846aa51ddde4074e0555d490260ad4e918f14..c9f36273705aaa75b878d7babdd694f1fa27daa5 100644
--- a/MatlabFiles/empdfsort.m
+++ b/MatlabFiles/empdfsort.m
@@ -15,6 +15,23 @@ function imfcnt = empdfsort(imfcnt,imf_h,imfloor,hbin,ninv)
 % imfcnt:  updated ninv+2-by-k matrix of counts (probability)
 %
 % January 1999 TAZ
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 %** find the bin locations and arrange them to the order of 1, 2, ...
 countInt = floor( (imf_h-imfloor) ./ hbin ); % imstp-by-nvar^2
diff --git a/MatlabFiles/errors.m b/MatlabFiles/errors.m
index b06b8f7879530fc3007aa1449c149ee7bc741293..09a5dd6f076aef483c335117d1bc8b0201c2635c 100644
--- a/MatlabFiles/errors.m
+++ b/MatlabFiles/errors.m
@@ -13,6 +13,22 @@ function [vd,str,imf] = errors(Bh,swish,nn)
 %              form or dimension is the same as "Bh" from the function "sye";
 %         swish is the inv(A0) in the structural model A(L)y(t) = e(t).
 %         nn is the numbers of inputs [nvar,lags,# of impulse responses].
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nvar = nn(1);
 lags = nn(2);
diff --git a/MatlabFiles/fcstidcnd.m b/MatlabFiles/fcstidcnd.m
index 3587f41a1cb4fa32ec52c0500658cfe454afa65c..edce12ff627fafc1876e8773ffaf91b52c4ab303 100644
--- a/MatlabFiles/fcstidcnd.m
+++ b/MatlabFiles/fcstidcnd.m
@@ -62,6 +62,22 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fcstidcnd(valuecon,stepcon,varcon,nstepsm
 % 3/20/99 Disenabled draws of MS shcoks.  To enable it, activate /* part
 % 3/20/99 Added A0_h and forep and deleted Cms as input argument.  Previous
 %              programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 DLSIdShock = ~isempty(eq_ms);   % if not empty, the MS shock is identified as in DLS
diff --git a/MatlabFiles/fcstidcnd2.m b/MatlabFiles/fcstidcnd2.m
index 64131893d3d0bd240f221ca00578bfe67b5b2318..081c52049838c6f557a29143efe4fa4e0f62a2d6 100644
--- a/MatlabFiles/fcstidcnd2.m
+++ b/MatlabFiles/fcstidcnd2.m
@@ -66,6 +66,22 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fcstidcnd2(valuecon,stepcon,varcon,nsteps
 % 3/20/99 Added A0_h and forep and deleted Cms as input argument.
 % 3/21/99 Added nconadd and eq_oth.
 %   Previous programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/fidcnderr.m b/MatlabFiles/fidcnderr.m
index c4dc9501afc3bbe9d57eadd0607ad3564b63b0f4..979ae4e3a39cb348d158df4f777c9ea6e5db8b8a 100644
--- a/MatlabFiles/fidcnderr.m
+++ b/MatlabFiles/fidcnderr.m
@@ -50,6 +50,23 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fidcnderr(valuecon,stepcon,varcon,nconstr
 %%                 e = R*inv(R'*R)*r.
 %
 % Copyright (c) March 1998 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 IdenShock = ~isempty(eq_iden);   % if not empty, the shock is identified
diff --git a/MatlabFiles/fidcndexa.m b/MatlabFiles/fidcndexa.m
index 93c8e51c074c7bb32efc4c3d7ac89871202680bd..1e4e478b93939ac1fd3e250c8f8ced30d8b04353 100644
--- a/MatlabFiles/fidcndexa.m
+++ b/MatlabFiles/fidcndexa.m
@@ -32,6 +32,22 @@ function Estrexa = fidcndexa(yexa,phil,A0_h,Bh_h,nvar,lags)
 %
 % Copyright (c) April 1998 by Tao Zha
 % Change the input arguments so that old programs may not be compatible, 03/19/98.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 tcwc = nvar*lags;     % total coefficients without constant
 actup = length(yexa(:,1));   % periods considered for structural shocks.
diff --git a/MatlabFiles/fidencond.m b/MatlabFiles/fidencond.m
index 4bde0820679a6f8e045112ee2398a4c512abea7a..4a5cb95fa4a1e619308513f7f44c8346341cd65d 100644
--- a/MatlabFiles/fidencond.m
+++ b/MatlabFiles/fidencond.m
@@ -56,6 +56,22 @@ function [yhat,Estr,rcon,Ome,Rmat,u,v,d] = fidencond(valuecon,stepcon,varcon,nco
 %
 % Copyright (c) February 1998 by Tao Zha
 % NOTE: the code needs to be improved, 10/19/98 (use lzpaper/fcstidcnd.m for the time being).
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 %IdenShock = ~isempty(eq_iden);   % if not empty, the shock is identified
diff --git a/MatlabFiles/find_betapar.m b/MatlabFiles/find_betapar.m
index f1b6ae6727a8309ac7873da83713d51d22b21727..7345cc4b7e8539118cc75879d36e1e4c65f959cd 100644
--- a/MatlabFiles/find_betapar.m
+++ b/MatlabFiles/find_betapar.m
@@ -15,6 +15,24 @@ function [a, b, XLO, XUP] = find_betapar(XLO, XUP, PLO, PUP, a0, b0);
 %--- The density is finite if a,b>=1.
 %--- Noninformative density: (1) a=b=1; (2) a=b=0.5; or (3) a=b=0.
 %-----------------------------------------------------------------------------------
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 XLO >= XUP;
     error('the lower bound needs to be smaller than the upper bound')
 elseif XLO<=0 or XUP >=1;
diff --git a/MatlabFiles/find_gampar.m b/MatlabFiles/find_gampar.m
index 4967637eea9b6b4b8d0e1117cdb5a554e47a9a83..e008085db2b8843296fd4100a5740ef9ed657dcd 100644
--- a/MatlabFiles/find_gampar.m
+++ b/MatlabFiles/find_gampar.m
@@ -13,6 +13,22 @@ function [a, b, XLO, XUP] = find_gampar(XLO, XUP, PLO, PUP, a0, b0);
 %--- Noninformative distribution: a,b -> 0.
 %--- The density function is finite if a >= 1.
 %-----------------------------------------------------------------------------------
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 XLO >= XUP;
     error('the lower bound needs to be smaller than the upper bound')
diff --git a/MatlabFiles/find_invgampar.m b/MatlabFiles/find_invgampar.m
index f5466252a654d057d01a042c100567fdd4804ce8..56e27a872714396db7663f7ee35310532e11e2ad 100644
--- a/MatlabFiles/find_invgampar.m
+++ b/MatlabFiles/find_invgampar.m
@@ -14,6 +14,22 @@ function [a, b, XLO, XUP] = find_invgampar(XLO, XUP, PLO, PUP, a0, b0);
 %--- Noninformative distribution: a,b -> 0.
 %--- How to draw: (1) draw z from Gamma(a,b); (2) let x=1/z.
 %-----------------------------------------------------------------------------------
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 XLO >= XUP;
     error('the lower bound needs to be smaller than the upper bound')
diff --git a/MatlabFiles/find_normpar.m b/MatlabFiles/find_normpar.m
index 761f7b79f25e41cc9d2d4382e51b0dfa1117b1dc..c39b7432102df739618a03814fe9bd73be8f3c81 100644
--- a/MatlabFiles/find_normpar.m
+++ b/MatlabFiles/find_normpar.m
@@ -5,6 +5,22 @@ function [a, b, XLO, XUP] = find_normpar(XLO, XUP, PLO, PUP, a0, b0);
 % probabilities of the bounds [PLO, PUP], and the initial values for ab=[a0, b0]
 % and returns the estimates of a and b (as well as XLO and XUP)
 % by solving the non-linear functions in normpar(ab, XLO, XUP, PLO, PUP).
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 XLO >= XUP;
     error('the lower bound needs to be smaller than the upper bound')
diff --git a/MatlabFiles/fn_a0cfreefun_tv.m b/MatlabFiles/fn_a0cfreefun_tv.m
index f9c0f2ee0c89a49d3a087b52bdac3886683d2792..d4a189ecf510b900b0214fb7d12d415929eaa19b 100644
--- a/MatlabFiles/fn_a0cfreefun_tv.m
+++ b/MatlabFiles/fn_a0cfreefun_tv.m
@@ -40,6 +40,23 @@ function of = fn_a0cfreefun_tv(b,nvar,nStates,n0cumsum,Ui,Tkave,Del00invcell_ave
 % See fn_a0cfreegrad_tv.m for analytical gradient for this function.
 %
 % Tao Zha, September 2001
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 A0_shat=zeros(nvar,nvar,nStates);    %  Arranged A0 matrix across states.
diff --git a/MatlabFiles/fn_a0cfreegrad_tv.m b/MatlabFiles/fn_a0cfreegrad_tv.m
index 40fd4f62d996191303cbc751afaa7698d4a05048..5bea42ff1ca68995303776cbef069195614ea673 100644
--- a/MatlabFiles/fn_a0cfreegrad_tv.m
+++ b/MatlabFiles/fn_a0cfreegrad_tv.m
@@ -25,6 +25,22 @@ function [g,badg] = fn_a0cfreegrad_tv(b,nvar,nStates,n0cumsum,Ui,Tkave,Del00invc
 % badg: 0, the value that is used in csminwel.m.
 %
 % Tao Zha, September 2001
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 A0_shat=zeros(nvar,nvar,nStates);    %  Arranged A0 matrix across states.
diff --git a/MatlabFiles/fn_a0freefun.m b/MatlabFiles/fn_a0freefun.m
index 44ed72737bcfe3c038197b0e7ca6b512b7e8d5d4..9c1cbb415fb6e99a9ddff3599304767e9054ad01 100644
--- a/MatlabFiles/fn_a0freefun.m
+++ b/MatlabFiles/fn_a0freefun.m
@@ -20,6 +20,22 @@ function of = fn_a0freefun(b,Ui,nvar,n0,fss,H0inv)
 % of:  objective function (negative logPosterior)
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 b=b(:); n0=n0(:);
 
diff --git a/MatlabFiles/fn_a0freegrad.m b/MatlabFiles/fn_a0freegrad.m
index a48bb38b71b9d7d77b48957b4a3fcafc79cd5ef2..638db31417d89aef616c41d15f75f9532b05e4bd 100644
--- a/MatlabFiles/fn_a0freegrad.m
+++ b/MatlabFiles/fn_a0freegrad.m
@@ -19,6 +19,23 @@ function [g,badg] = fn_a0freegrad(b,Ui,nvar,n0,fss,H0inv)
 % badg: 0, the value that is used in csminwel.m
 %
 % Tao Zha, February 2000.  Revised, August 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 b=b(:);  n0 = n0(:);
 
diff --git a/MatlabFiles/fn_a0sfreefun.m b/MatlabFiles/fn_a0sfreefun.m
index 881d991f295707480f8e5cad432f458c60b1e044..3f5144f65da3f762ea146faba7a501d35f342622 100644
--- a/MatlabFiles/fn_a0sfreefun.m
+++ b/MatlabFiles/fn_a0sfreefun.m
@@ -29,6 +29,23 @@ function of = fn_a0sfreefun(b,Uistar,Uibar,nvar,nStates,n0,Tkave,Sgm0tldinvave)
 %
 % This function is a special case of fn_a0sfreefun2.m.
 % Tao Zha, March 2001
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 n0=n0(:);
diff --git a/MatlabFiles/fn_a0sfreefun2.m b/MatlabFiles/fn_a0sfreefun2.m
index ef19a48e1c362eb48479604e3f37e52e53957393..ffc2f441ecd76456bbf78df22740b5d50498d759 100644
--- a/MatlabFiles/fn_a0sfreefun2.m
+++ b/MatlabFiles/fn_a0sfreefun2.m
@@ -46,6 +46,22 @@ function of = fn_a0sfreefun2(b,Uistar,Uibar,nvar,nStates,n0,n0cumsum,tvstate,tvt
 % This function is called by tveml*.m which is an old program compared with szeml*.m.  Thus,
 %   use fn_a0cfreefun_tv.m if possible.
 % Tao Zha, August 2001.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 n0=n0(:);
diff --git a/MatlabFiles/fn_a0sfreegrad.m b/MatlabFiles/fn_a0sfreegrad.m
index 5dab96b03e3fab8d6d4ce7396866fa4ab2612269..4d09f2396db5c9fdaee12eed43fa0e86d37e95c8 100644
--- a/MatlabFiles/fn_a0sfreegrad.m
+++ b/MatlabFiles/fn_a0sfreegrad.m
@@ -29,6 +29,23 @@ function [g,badg] = fn_a0sfreegrad(b,Uistar,Uibar,nvar,nStates,n0,Tkave,Sgm0tldi
 % badg: 0, the value that is used in csminwel.m.
 %
 % Tao Zha, March 2001
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 n0=n0(:);
diff --git a/MatlabFiles/fn_a0sfreegrad2.m b/MatlabFiles/fn_a0sfreegrad2.m
index f840ecbfe7c7e12a3205584e01383c855bd5fadd..bc7eb939a3026265a53c009dcd3dab44182db193 100644
--- a/MatlabFiles/fn_a0sfreegrad2.m
+++ b/MatlabFiles/fn_a0sfreegrad2.m
@@ -40,6 +40,22 @@ function [g,badg] = fn_a0sfreegrad2(b,Uistar,Uibar,nvar,nStates,n0,n0cumsum,tvst
 % badg: Always 0 --- the value that is used in csminwel.m.
 %
 % Tao Zha, August 2001.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 n0=n0(:);
diff --git a/MatlabFiles/fn_calyrqm.m b/MatlabFiles/fn_calyrqm.m
index 695c23d96c6fa2a4ad59712979d32996930f653d..5025449e9797c9dc12995b8fb59310558b6cd7a1 100644
--- a/MatlabFiles/fn_calyrqm.m
+++ b/MatlabFiles/fn_calyrqm.m
@@ -12,6 +12,23 @@ function [Myrqm,nMyrqm] = fn_calyrqm(q_m,Byrqm,Eyrqm)
 % nMyrqm:  number of data points incl. Byrqm and Eyrqm
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 ~isempty(find(Byrqm-round(Byrqm))) | (q_m-round(q_m)) | ~isempty(find(Byrqm-round(Byrqm)))
    error('argin qm, Byrqm, or Eyrqm must of integer')
diff --git a/MatlabFiles/fn_construct_cov.m b/MatlabFiles/fn_construct_cov.m
index cb3a592f3caf68d864d3cb0b471e5c3e2b0cf6fb..47f58887a60aebbbe8ccdc9ca5a715b3af1cb6a9 100644
--- a/MatlabFiles/fn_construct_cov.m
+++ b/MatlabFiles/fn_construct_cov.m
@@ -4,6 +4,23 @@ function covM = fn_construct_cov(diagcovM, corM)
 %  corM:  correlation matrix  (input)
 %  covM:  covariance matrix (output)
 %  9 May 2008
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 [nvar,jnk]=size(corM);
 if nvar~=jnk
diff --git a/MatlabFiles/fn_corr.m b/MatlabFiles/fn_corr.m
index 64649450c7252b85c6b387b329882732dd9bfc8c..165f329143b19094774bb129d94522f6f86440c0 100644
--- a/MatlabFiles/fn_corr.m
+++ b/MatlabFiles/fn_corr.m
@@ -4,6 +4,23 @@ function corM = fn_corr(covM)
 %  covM:  covariance matrix (input)
 %  corM:  correlation matrix  (output)
 %  6 September 1998
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 [nvar,jnk]=size(covM);
 if nvar~=jnk
diff --git a/MatlabFiles/fn_dataext.m b/MatlabFiles/fn_dataext.m
index 0eaa3ae18718dc7af9a14448818a0f43ae2db633..0366fdf0fbb1530927b7dbe426cde78865e956d6 100644
--- a/MatlabFiles/fn_dataext.m
+++ b/MatlabFiles/fn_dataext.m
@@ -11,6 +11,23 @@ function [xdsube,Brow,Erow] = fn_dataext(Byrqm,Eyrqm,xdatae)
 % Erow:  the row number in xdatee that marks the last row of xdsube.
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (Byrqm(2)==0) & (Eyrqm(2)~=0)
    error('If annual data, make sure both Byrqm(2) and Eyrqm(2) are zero')
diff --git a/MatlabFiles/fn_dataext2.m b/MatlabFiles/fn_dataext2.m
index 8a34b88486c264f396464f9d8c6ecea71592166c..dc9abb99af9550462ce9395c118be242ea4bdc4a 100644
--- a/MatlabFiles/fn_dataext2.m
+++ b/MatlabFiles/fn_dataext2.m
@@ -11,6 +11,23 @@ function [xdsube,Brow,Erow] = fn_dataext2(Byrqm,Eyrqm,xdatae)
 % Erow:  the row number in xdatee that marks the last row of xdsube.
 %
 % Tao Zha, April 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (Byrqm(2)==0)
     Eyrqm(2)=0;
diff --git a/MatlabFiles/fn_datana.m b/MatlabFiles/fn_datana.m
index 91d57321d97757811c9ff3b89e168e347f0ac939..64c6e4baf50aa42d56dd9bc6ccbfc4007cdd8e65 100644
--- a/MatlabFiles/fn_datana.m
+++ b/MatlabFiles/fn_datana.m
@@ -26,6 +26,23 @@ function [yactyrge,yactyre,yactqmyge,yactqmge,yactqme] = fn_datana(xdatae,q_m,vl
 %           Same as xdatae but with Brow:Erow.
 %
 % Tao Zha, April 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(xdatae,1)<2*q_m
    error('We need at least two years of xdatae to get annual rates.  Check xdatae!!')
diff --git a/MatlabFiles/fn_datana2.m b/MatlabFiles/fn_datana2.m
index 93b3d66ee21280f395cd51fe6e2fffd461241fa9..6a78d07537764973aad225318be1ff0904f47299 100644
--- a/MatlabFiles/fn_datana2.m
+++ b/MatlabFiles/fn_datana2.m
@@ -33,6 +33,22 @@ function [yactyrge,yactyre,yactqmyge,yactqmge,yactqge,yacteoqyge,yactqme] = fn_d
 % See the old but useful function fore_mqy.m.
 % Added yactqge in February 2004.
 % Added yacteoqyge in March 2004.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(xdatae,1)<2*q_m
    error('We need at least two years of xdatae to get annual rates.  Check xdatae!!')
diff --git a/MatlabFiles/fn_dataxy.m b/MatlabFiles/fn_dataxy.m
index cd21674d566a464e3c9616d39b39822e7678b392..128038a58ec47c7fcd1dcd6c112e7d6451da138b 100644
--- a/MatlabFiles/fn_dataxy.m
+++ b/MatlabFiles/fn_dataxy.m
@@ -39,6 +39,23 @@ function [xtx,xty,yty,fss,phi,y,ncoef,xr,Bh,e] = fn_dataxy(nvar,lags,z,mu,indxDu
 % e:  estimated residual e = y -x*Bh,  T-by-nvar
 %
 % Tao Zha, February 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 5
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_dataxy7982.m b/MatlabFiles/fn_dataxy7982.m
index 74de9b4ce5dd15cdab588a89d52312e574001098..c08e79cbb39313a65516845d46e47f8b2607f355 100644
--- a/MatlabFiles/fn_dataxy7982.m
+++ b/MatlabFiles/fn_dataxy7982.m
@@ -43,6 +43,23 @@ function [xtx,xty,yty,fss,phi,y,ncoef,xr,Bh,e] = fn_dataxy7982(nvar,lags,z,mu,in
 %
 % Tao Zha, February 2000. Revised, May 2001.
 % See fn_dataxy.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 9
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_dataxyoldver.m b/MatlabFiles/fn_dataxyoldver.m
index 0c532ff392bd281f0cbc3580ca826a673059f267..d7056fe8dff3a4b1d40b85579e3d8458914a15a4 100644
--- a/MatlabFiles/fn_dataxyoldver.m
+++ b/MatlabFiles/fn_dataxyoldver.m
@@ -29,6 +29,23 @@ function [xtx,xty,yty,fss,phi,y,ncoef,xr,Bh,e] = fn_dataxyOldVer(nvar,lags,z,mu5
 %
 % Tao Zha, February 2000
 % See fn_rnrprior2.m for the base prior.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 6
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_demarw.m b/MatlabFiles/fn_demarw.m
index d53698918ddb9d138514f8f77f37c1b2f8a41f0e..08acf55affa27e681aaef7dfcecdaa7d0d25aa39 100644
--- a/MatlabFiles/fn_demarw.m
+++ b/MatlabFiles/fn_demarw.m
@@ -14,6 +14,23 @@ function [imfl,imfh,imfl1,imfh1, imfmedian] = demarw(xpo,xprob)
 %
 % Note: fn_histwpdfg() must be called first to get xpo and xprob.
 % August 1999 Tao Zha; Revised, August 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 [ndraws,n]=size(xpo);
 
diff --git a/MatlabFiles/fn_dirichprior.m b/MatlabFiles/fn_dirichprior.m
index 4dd76cda8cc6da1579d87e7a81d4c960d76e7eb3..6c903d434e708f27faeb1cc48fa54724c91041e5 100644
--- a/MatlabFiles/fn_dirichprior.m
+++ b/MatlabFiles/fn_dirichprior.m
@@ -15,6 +15,23 @@ function [Galpha,stdthe] = fn_dirichprior(Glamda,std_maxv)
 %
 % See Gelman, et al p. 476 and TVBvar Note pp. 24-31
 % Tao Zha, March 2001
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 Glamda = Glamda(:);   % Column vector!  Prior modes for the random variables \theta.
 [maxlam,indxlam] = max(Glamda);  % index for the selected hyperparameter that is freely set to match the variance of the corresponding random variable.
diff --git a/MatlabFiles/fn_dlrpostr.m b/MatlabFiles/fn_dlrpostr.m
index 0334c1a03641b7ba0a7d29cacbaa8d1ba6a67018..27a8628de1811b8e3d1548e720070ce53a6d6c73 100644
--- a/MatlabFiles/fn_dlrpostr.m
+++ b/MatlabFiles/fn_dlrpostr.m
@@ -28,6 +28,23 @@ function [P,H0inv,Hpinv] = fn_dlrpostr(xtx,xty,yty,Ui,Vi)
 %           ith equation.
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 nvar = size(yty,1);
 
diff --git a/MatlabFiles/fn_empdfsort.m b/MatlabFiles/fn_empdfsort.m
index b4e874680a307d4ef4b6900100e3f448d6746f3f..ce2f41936c69c1843d96979ce2050c9625823fe8 100644
--- a/MatlabFiles/fn_empdfsort.m
+++ b/MatlabFiles/fn_empdfsort.m
@@ -15,6 +15,23 @@ function imfcnt = fn_empdfsort(imfcnt,imf_h,imfloor,hbin,ninv)
 % imfcnt:  updated ninv+2-by-k matrix of counts (probability)
 %
 % January 1999 TZ; Revised, August 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 %** find the bin locations and arrange them to the order of 1, 2, ...
 imf_h=imf_h(:); imfloor=imfloor(:); hbin=hbin(:);
diff --git a/MatlabFiles/fn_ergodp.m b/MatlabFiles/fn_ergodp.m
index 8c32351ba9b64c434733d430cf3966bf709eec80..93cef5da493ae5095ea3953444264cc4e37665ae 100644
--- a/MatlabFiles/fn_ergodp.m
+++ b/MatlabFiles/fn_ergodp.m
@@ -7,6 +7,23 @@ function gpi = fn_ergodp(P)
 % gpi:  n-by-1 vector of ergodic probabilities.
 %
 % Tao Zha August 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 [gpim,gpid] = eig(P);  % m: matrix; d: diagonal
 [gpidv,gpidvinx] = sort(diag(gpid));
diff --git a/MatlabFiles/fn_fcstcnd.m b/MatlabFiles/fn_fcstcnd.m
index 389c555072d94272e83a81849eb8cc79d6c05523..68a246153c48dbaced423d6af48766954f35f628 100644
--- a/MatlabFiles/fn_fcstcnd.m
+++ b/MatlabFiles/fn_fcstcnd.m
@@ -60,6 +60,22 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fn_fcstcnd(valuecon,stepcon,varcon,nsteps
 % Copyright (c) March 1998 by Tao Zha. Revised November 1998, May 2001 (Delete A0_h as
 %    input arg so that previous programs may not be compatible).
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 DLSIdShock = ~isempty(eq_ms);   % if not empty, the MS shock is identified as in DLS
 
diff --git a/MatlabFiles/fn_fcstidcnd.m b/MatlabFiles/fn_fcstidcnd.m
index 9e690b5bf7fd49195d90427166d53bfa2978ad96..0bf66715fc968ca6385a7c9fe25b5300d6b93768 100644
--- a/MatlabFiles/fn_fcstidcnd.m
+++ b/MatlabFiles/fn_fcstidcnd.m
@@ -68,6 +68,22 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fn_fcstidcnd(valuecon,stepcon,varcon,nste
 %
 % Comparing with the version fn_fcstidcnd2.m, this is a better version.
 %   See the note in fn_fcstidcnd2.m for explanation.  April, 2009.  TZ.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 DLSIdShock = ~isempty(eq_ms);   % if not empty, the MS shock is identified as in DLS
 
diff --git a/MatlabFiles/fn_fcstidcnd2.m b/MatlabFiles/fn_fcstidcnd2.m
index 17cb91f48d7b78ce6baca8f5adf27d8aa6dc91ac..f88fe953b492bfe781bae9128b8391521c9bf72d 100644
--- a/MatlabFiles/fn_fcstidcnd2.m
+++ b/MatlabFiles/fn_fcstidcnd2.m
@@ -68,11 +68,28 @@ function [yhat,Estr,rcon,Rcon,u,v,d] = fn_fcstidcnd2(valuecon,stepcon,varcon,nst
 % 3/20/99 Added A0_h and forep and deleted Cms as input argument.
 % 3/21/99 Added nconadd and eq_oth.
 %   Previous programs may not be compatible.
+
 %
 % This version differs from "fn_fcstidcnd.m" because nconadd, radd, and Radd are added to allow for
 %   both DLS-WZ conditions and structural-shock conditions to exist at the same time.  My recognition
 %   is that it does not work well at all.  So one should use the version "fn_fcstidcnd.m.""  April, 2009 by TZ.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 %
diff --git a/MatlabFiles/fn_forecast.m b/MatlabFiles/fn_forecast.m
index a7e528f5003d7d14da4675b3017088c7ce326b97..86c50bbcde9efdcaf1fa85e854664cc1de475721 100644
--- a/MatlabFiles/fn_forecast.m
+++ b/MatlabFiles/fn_forecast.m
@@ -15,6 +15,23 @@ function yhat = fn_forecast(Bh,phi,nn,nexo,Xfexo)
 % yhat: nfqm-by-nvar forecast.
 %
 % See fn_forecastsim.m with shocks; fn_forecaststre.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 3
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_forecastfixe.m b/MatlabFiles/fn_forecastfixe.m
index a07340d5f23d74d948fc52e912b25393416d8d8f..e378dc4617edecacd837d0b97e355fff366211f2 100644
--- a/MatlabFiles/fn_forecastfixe.m
+++ b/MatlabFiles/fn_forecastfixe.m
@@ -18,6 +18,23 @@ function yhat = fn_forecastfixe(Bh,A0h,phi,nn,Estr,nexo,Xfexo)
 % yhat: nfqm*nvar matrix of forecasts.
 %
 % See also fn_forecast.m and fn_forecastsim.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 5
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_forecastsim.m b/MatlabFiles/fn_forecastsim.m
index b6d79312f189787c559a59ef20d9eec59414bcd4..79a04c27fad04ec95748f2f7f03862a5d0e568e1 100644
--- a/MatlabFiles/fn_forecastsim.m
+++ b/MatlabFiles/fn_forecastsim.m
@@ -17,6 +17,23 @@ function yhat = fn_forecastsim(Bh,A0h,phi,nn,nexo,Xfexo)
 %
 % See fn_forecast.m without shocks and forecasterr.m when A0h_in (instead of A0h) is used;
 %     fn_forecaststre.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 4
    nexo=1;    % default for constant term
diff --git a/MatlabFiles/fn_foregraph.m b/MatlabFiles/fn_foregraph.m
index f786837dca38eb267bd71112169d79c45baa8c0c..424870f2481a7746ff4f5845f2f05163825719a8 100644
--- a/MatlabFiles/fn_foregraph.m
+++ b/MatlabFiles/fn_foregraph.m
@@ -16,6 +16,22 @@ function fn_foregraph(yfore,yacte,keyindx,rnum,cnum,q_m,ylab,forelabel,conlab)
 %  See fn_seriesgraph.m, fn_forerrgraph.m.
 %
 % Tao Zha, March 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 vyrs = yfore(:,1);
diff --git a/MatlabFiles/fn_forerrgraph.m b/MatlabFiles/fn_forerrgraph.m
index 654a7a43ab030b795c68dad54951283356dc45d4..b2fc21a9dd3fc9090a5d69c98fb44397e0787832 100644
--- a/MatlabFiles/fn_forerrgraph.m
+++ b/MatlabFiles/fn_forerrgraph.m
@@ -20,6 +20,22 @@ function fn_forerrgraph(yfore,yforel,yforeh,yacte,keyindx,rnum,cnum,q_m,ylab,for
 %  See fn_seriesgraph.m, fn_foregraph.m.
 %
 % Tao Zha, August 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 vyrs = yfore(:,1);     % vectorized
diff --git a/MatlabFiles/fn_fprintmatrix.m b/MatlabFiles/fn_fprintmatrix.m
index c7e34f9cbec201212f77d179a2dd6b7bec42df43..2bd5cc2376706ed67b2263ac5d4059100040ee7e 100644
--- a/MatlabFiles/fn_fprintmatrix.m
+++ b/MatlabFiles/fn_fprintmatrix.m
@@ -10,6 +10,23 @@ function fn_fprintmatrix(fid, M, nrows, ncols, indxFloat)
 %               2 if single;
 %               3 if only 3 significant digits
 %               0 if integer.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nrows~=size(M,1)
    error('fn_fprintmatrix(): Make sure the row number supplied match that of the matrix');
diff --git a/MatlabFiles/fn_fprintvector.m b/MatlabFiles/fn_fprintvector.m
index c82d98bc5b5a64cf1424bd0c13882f29832736b2..2329c6c76a6ca65da3da24ff1336ca41c5dac246 100644
--- a/MatlabFiles/fn_fprintvector.m
+++ b/MatlabFiles/fn_fprintvector.m
@@ -8,6 +8,23 @@ function fn_fprintvector(fid, vec, ncols, indxFloat)
 %   indxFloat:  1 if double;
 %               2 if single;
 %               0 if integer.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(vec,1)~=1
    error('fn_fprintvector(): The vector must be a row vector');
diff --git a/MatlabFiles/fn_gfmean.m b/MatlabFiles/fn_gfmean.m
index 9991762b2bfa0eb4c46943059bd43ab93844f09f..b0dd67b61f6ae5a0d48e107f5519714f62d5ab7d 100644
--- a/MatlabFiles/fn_gfmean.m
+++ b/MatlabFiles/fn_gfmean.m
@@ -21,6 +21,23 @@ function [Fmat,gvec] = fn_gfmean(b,P,Vi,nvar,ncoef,n0,np)
 % gvec: sum(np)-by-1 stacked vector of all free lagged parameters A+.
 %
 % Tao Zha, February 2000.  Revised, August 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 b=b(:); n0=n0(:); np=np(:);
 
diff --git a/MatlabFiles/fn_gibbsglb.m b/MatlabFiles/fn_gibbsglb.m
index d177127b36fae6c51d9d9a615731109ed8719c74..cace135b1279b447be12035f3155929e196685e5 100644
--- a/MatlabFiles/fn_gibbsglb.m
+++ b/MatlabFiles/fn_gibbsglb.m
@@ -21,6 +21,22 @@ function [cT,vR,kdf] = fn_gibbsglb(Sbd,idmat0,nvar,fss)
 %          "gibbsvar.m"
 %
 % Written by Tao Zha; Copyright (c) 1999 by Waggoner and Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 kdf = fss;  %2;     %fss;
diff --git a/MatlabFiles/fn_gibbsrvar.m b/MatlabFiles/fn_gibbsrvar.m
index 1e3e8653ddcfaf2f78bb121eafe98fb4d5f949aa..6e0d2e253aa7105bc0002a8dd22251bcf3893b75 100644
--- a/MatlabFiles/fn_gibbsrvar.m
+++ b/MatlabFiles/fn_gibbsrvar.m
@@ -21,6 +21,23 @@ function [A0gbs, Wcell] = fn_gibbsrvar(A0gbs,UT,nvar,fss,n0,Indxcol)
 %
 % Written by Tao Zha, August 2000. Revised, September 2004.
 % Copyright (c) by Waggoner and Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin==5), Indxcol=[1:nvar]; end
 
diff --git a/MatlabFiles/fn_gibbsrvar_setup.m b/MatlabFiles/fn_gibbsrvar_setup.m
index 972f55e99d1c77522025ccf04a7a22b20c101eb0..2c3049829de4c90fcb9f868b2885ff499e45b0d3 100644
--- a/MatlabFiles/fn_gibbsrvar_setup.m
+++ b/MatlabFiles/fn_gibbsrvar_setup.m
@@ -37,6 +37,23 @@ function [Tinv,UT,VHphalf,PU,VPU] = fn_gibbsrvar_setup(H0inv, Ui, Hpinv, Pmat, V
 %
 % Written by Tao Zha, September 2004.
 % Copyright (c) 2004 by Waggoner and Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 
 %--- For A0.
diff --git a/MatlabFiles/fn_gibbsrvaroldworks.m b/MatlabFiles/fn_gibbsrvaroldworks.m
index 35a2624011bba374cdd351475d78389411bb22b7..ed20ecc93a81e8da5787049c030705edc461d0bf 100644
--- a/MatlabFiles/fn_gibbsrvaroldworks.m
+++ b/MatlabFiles/fn_gibbsrvaroldworks.m
@@ -18,6 +18,22 @@ function A0gbs = fn_gibbsrvar(A0gbs,UT,nvar,fss,n0,Indxcol)
 % A0bgs:  new draw of A0 matrix in this Gibbs step
 %
 % Written by Tao Zha, August 2000; Copyright (c) by Waggoner and Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin==5), Indxcol=[1:nvar]; end
 
diff --git a/MatlabFiles/fn_gradcd.m b/MatlabFiles/fn_gradcd.m
index 409fdf7af4d2a17d10e8829516220709229336ea..276c9e966ace6bdc5c27ccc1c0b6810552d6996a 100644
--- a/MatlabFiles/fn_gradcd.m
+++ b/MatlabFiles/fn_gradcd.m
@@ -16,6 +16,23 @@ function grdd = fn_gradcd(fcn,x0,grdh,P1,P2,P3,P4,P5,P6,P7,P8,P9,...
 %   grdd: n-by-k Jacobian matrix (gradients).
 %
 % Written by Tao Zha, 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 stps = eps^(1/3);
 % eps: floating point relative accuracy or machine precision: 2.22e-16
diff --git a/MatlabFiles/fn_gradcd2.m b/MatlabFiles/fn_gradcd2.m
index 55a30d95ead3f593544798918c69cb35ff52a130..7712ac8935bd81689f4f50c9ce500bc81a5b3c2d 100644
--- a/MatlabFiles/fn_gradcd2.m
+++ b/MatlabFiles/fn_gradcd2.m
@@ -16,6 +16,22 @@ function grdd = fn_gradcd2(fcn,x0,grdh,P1,P2,P3,P4,P5,P6,P7,P8,P9,...
 %   grdd: n-by-k Jacobian matrix (gradients).
 %
 % Written by Tao Zha, 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 stps = eps^(1/3);
 % eps: floating point relative accuracy or machine precision: 2.22e-16
diff --git a/MatlabFiles/fn_gyrfore.m b/MatlabFiles/fn_gyrfore.m
index ef230db22ccb578262b155c099c8389911f10dfb..6218ae685c4d8d9e0cf110e564b44e9b3176e8de 100644
--- a/MatlabFiles/fn_gyrfore.m
+++ b/MatlabFiles/fn_gyrfore.m
@@ -14,6 +14,22 @@ function fn_gyrfore(yfore,yacte,keyindx,rnum,cnum,ylab,forelabel,conlab)
 % No output argument for this graph file
 %
 % Tao Zha, March 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 vyrs = yfore(:,1);
diff --git a/MatlabFiles/fn_hesscd.m b/MatlabFiles/fn_hesscd.m
index ce5979e94cdc21486b6d039d6c13a754c48e779a..a46716b77e30096bc9c788ece3b795b9f21a126c 100644
--- a/MatlabFiles/fn_hesscd.m
+++ b/MatlabFiles/fn_hesscd.m
@@ -9,6 +9,23 @@ function grdd = fn_hesscd(fcn,x0,grdh,P1,P2,P3,P4,P5,P6,P7,P8,P9,...
 %   grdd: hessian matrix (second derivative), n*n.
 %
 % Written by Tao Zha, May 1998. Revised June 1002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 stps = eps^(1/3);
 % eps: floating point relative accuracy or machine precision: 2.22e-16
diff --git a/MatlabFiles/fn_histpdfcnt.m b/MatlabFiles/fn_histpdfcnt.m
index 2387d68d6aa7b5a82c3b2631415356384a7fb2f9..007fb892b4ee702a9619efcba19cef097cc58667 100644
--- a/MatlabFiles/fn_histpdfcnt.m
+++ b/MatlabFiles/fn_histpdfcnt.m
@@ -28,6 +28,23 @@ function [imfpdf,imfpo,imfprob] = fn_histpdfcnt(imfcnt,ndrawscnt,imfloor,hbin,ni
 %
 % 27 August 1998 Tao Zha
 % Revised, October 1998, March 1999, August 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin==5), gIndx=0; end
 if (nargin==8), lval=[]; hval=[]; end
diff --git a/MatlabFiles/fn_histwpdfg.m b/MatlabFiles/fn_histwpdfg.m
index 665292dfaadfbc0ba2db04b700dd45a4bd45ae57..288fa60df22be932fa63db2026f6c109e1a6767f 100644
--- a/MatlabFiles/fn_histwpdfg.m
+++ b/MatlabFiles/fn_histwpdfg.m
@@ -21,6 +21,22 @@ function [xpd,xc,xp,w,bw] = fn_histwpdfg(s,nbin,gIdx,w,xlabstr,ylabstr,titstr)
 % August 1999 by Tao Zha
 % July 18 2000.  Place w after gIdx so that previous programs need modifications accordingly.
 % Oct 1 2000.  Change the order of xpd, xc, and xp so that previous programs need modifications accordingly.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin<=4), titstr=[]; xlabstr=[]; ylabstr=[]; end
 [m,n] = size(s);
diff --git a/MatlabFiles/fn_histwpdfg2d.m b/MatlabFiles/fn_histwpdfg2d.m
index f7d5845db294cd037b2d0ef12a495a98b68710ab..1e203a6725f28f29fc0731a12ba395b26e5dd1c7 100644
--- a/MatlabFiles/fn_histwpdfg2d.m
+++ b/MatlabFiles/fn_histwpdfg2d.m
@@ -17,6 +17,22 @@ function [xc,yc,z,zn] = fn_histwpdfg2D(s,n,w,ditp,xlabstr,ylabstr)
 % if nargout==0, plot 2D p.d.f. graphics
 %
 % January 1999 by Tao Zha.  Revised, March 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(s,2)~=2)
    error('The size of 1st argument must be *-by-2 (i.e., 2 columns)')
diff --git a/MatlabFiles/fn_histwpdfg_bound.m b/MatlabFiles/fn_histwpdfg_bound.m
index 199cf859b56a931fa8055ed9680c2cb252f87304..b017cd7a7271741f104a866e4368b960fac8b5f5 100644
--- a/MatlabFiles/fn_histwpdfg_bound.m
+++ b/MatlabFiles/fn_histwpdfg_bound.m
@@ -22,6 +22,22 @@ function [xpd,xc,xp,w,bw] = fn_histwpdfg_bound(s,nbin,gIdx,bound,w,xlabstr,ylabs
 % August 1999 by Tao Zha
 % July 18 2000.  Place w after gIdx so that previous programs need modifications accordingly.
 % Oct 1 2000.  Change the order of xpd, xc, and xp so that previous programs need modifications accordingly.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin<=5), titstr=[]; xlabstr=[]; ylabstr=[]; end
 [m,n] = size(s);
diff --git a/MatlabFiles/fn_imc2errgraph.m b/MatlabFiles/fn_imc2errgraph.m
index 47efaa0269be6d4448477e186103ef974bacfe7f..f19134c686473c1dff47af40c1521ec77ac376c9 100644
--- a/MatlabFiles/fn_imc2errgraph.m
+++ b/MatlabFiles/fn_imc2errgraph.m
@@ -17,6 +17,23 @@ function scaleout = imc2errgraph(imf,firstl1,firsth1,...
 %  scaleout: column 1 represents maximums; column 2 minimums.  Rows: nvar variables.
 %
 %  See imrgraph, fn_imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 11, xTick = []; end
 
diff --git a/MatlabFiles/fn_imcerrgraph.m b/MatlabFiles/fn_imcerrgraph.m
index a0c76d09e38e1c5b66622f40edcb911cc3b6006b..36501975f049e5df2b090adc0186efdf9a3e37d9 100644
--- a/MatlabFiles/fn_imcerrgraph.m
+++ b/MatlabFiles/fn_imcerrgraph.m
@@ -16,6 +16,23 @@ function scaleout = fn_imcerrgraph(imf,firstl,firsth,nvar,imstp,xlab,ylab,indxGi
 %  scaleout: column 1 represents maximums; column 2 minimums.  Rows: nvar variables.
 %
 %  See fn_imcgraph, fn_imc2errgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 9, xTick = []; end
 if nargin < 10, indx_num = 0; end
diff --git a/MatlabFiles/fn_imcerrgraph_scl.m b/MatlabFiles/fn_imcerrgraph_scl.m
index 3a35ac1a4bf5cddbdcfcf0ce908c2eb85b72943f..733d3700d75d3c699ca24c26570ead903927d9d2 100644
--- a/MatlabFiles/fn_imcerrgraph_scl.m
+++ b/MatlabFiles/fn_imcerrgraph_scl.m
@@ -15,6 +15,23 @@ function scaleout = fn_imcerrgraph_scl(imf,firstl,firsth,nvar,imstp,scaleout,xla
 %  scaleout: column 1 represents maximums; column 2 minimums.  Rows: nvar variables.
 %
 %  See fn_imcgraph, fn_imc2errgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 10, xTick = []; end
 
diff --git a/MatlabFiles/fn_imcgraph.m b/MatlabFiles/fn_imcgraph.m
index dfb6cc23cf3f6869e773037427d0429298244eb9..cdc7cfb9e2906b7e9aef79825c1a9599aecba7a0 100644
--- a/MatlabFiles/fn_imcgraph.m
+++ b/MatlabFiles/fn_imcgraph.m
@@ -16,6 +16,22 @@ function scaleout = fn_imcgraph(imf,nvar,imstp,xlab,ylab,indxGimfml,xTick)
 %            older than 03/06/99, TZ
 %
 %  See imrgraph, fn_imcerrgraph, fn_imc2errgraph, imrerrgraph, fn_gyrfore in RVARcode
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 7, xTick = []; end
 
diff --git a/MatlabFiles/fn_imcgraph_scl.m b/MatlabFiles/fn_imcgraph_scl.m
index 0f7c99f78b72352931aa221cd760add83f3babb5..6fd2acfc499df92a71c1a1a5abef1a163ae1ab4d 100644
--- a/MatlabFiles/fn_imcgraph_scl.m
+++ b/MatlabFiles/fn_imcgraph_scl.m
@@ -16,6 +16,22 @@ function scaleout = fn_imcgraph_scl(imf,nvar,imstp,scaleout,xlab,ylab,indxGimfml
 %            older than 03/06/99, TZ
 %
 %  See imrgraph, fn_imcerrgraph, fn_imc2errgraph, imrerrgraph, fn_gyrfore in RVARcode
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 7, xTick = []; end
 
diff --git a/MatlabFiles/fn_impulse.m b/MatlabFiles/fn_impulse.m
index eca0c3e7f5a075e22d1a99d5526d25666b3fc076..77e618f97d307d7979c6f00c1c142592c161a7ca 100644
--- a/MatlabFiles/fn_impulse.m
+++ b/MatlabFiles/fn_impulse.m
@@ -17,6 +17,22 @@ function imf = fn_impulse(Bh,swish,nn)
 %
 %  Written by Tao Zha.
 % Copyright (c) 1994 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nvar = nn(1);
 lags = nn(2);
diff --git a/MatlabFiles/fn_irf_var1.m b/MatlabFiles/fn_irf_var1.m
index 3c42b68dda9b7bc8b2b825a88923207b53f2dd87..490a31f7ee7b4f03f19bbc18557869ca757b071e 100644
--- a/MatlabFiles/fn_irf_var1.m
+++ b/MatlabFiles/fn_irf_var1.m
@@ -9,6 +9,23 @@ function irfs = fn_irf_var1(G1, impact, nsteps);
 %  irfs: nsteps-by-n-by-r.  For each shock of r shocks, impulse responses are nsteps-by-n.
 %
 % See fn_vds.m and fn_uncondfcst_var1.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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,r] = size(impact);
 
diff --git a/MatlabFiles/fn_kalfil_tv.m b/MatlabFiles/fn_kalfil_tv.m
index c8548c466ceb64c70e714823ba7eacd66bd2d6dc..262a6a97e7d41bc85628d759c52f31183f4504bc 100644
--- a/MatlabFiles/fn_kalfil_tv.m
+++ b/MatlabFiles/fn_kalfil_tv.m
@@ -48,6 +48,22 @@ function [loglh,zt_tm1,Pt_tm1, loglh_t_allvalues] = fn_kalfil_tv(Y_T, a, H, R, G
 %
 %
 %==========================================================================
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 Tp1 = size(Y_T,2) + 1;  %T+1;
diff --git a/MatlabFiles/fn_kalfil_tv2.m b/MatlabFiles/fn_kalfil_tv2.m
index d81aa6fbda083d7b207fc594def63b72408eb82c..31003da7e073e811c325794fb0f20de406901731 100644
--- a/MatlabFiles/fn_kalfil_tv2.m
+++ b/MatlabFiles/fn_kalfil_tv2.m
@@ -52,6 +52,22 @@ function [loglh,zt_tm1,Pt_tm1, loglh_t_allvalues] = fn_kalfil_tv(Y_T, a, H, R, G
 %
 %==========================================================================
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 Tp1 = size(Y_T,2) + 1;  %T+1;
 n_y = size(a,1);
diff --git a/MatlabFiles/fn_logsum.m b/MatlabFiles/fn_logsum.m
index e640b94d7f1d3d410a0bce41ee4384af737ad674..a891cf85147bc1b0124a4106fb52ecc200f9ae45 100644
--- a/MatlabFiles/fn_logsum.m
+++ b/MatlabFiles/fn_logsum.m
@@ -11,6 +11,23 @@ function [log_sum, log_max] = fn_logsum(log_sum, log_max, log_new)
 % log_new:  log(x_{N+1}).
 %
 %Written by T. Zha; 12:20PM 06/28/2005
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 %=== Updates log_sumpdf with an additional pdf value.  See TVBVAR Notes p.81a.
 if (log_max>=log_new)
diff --git a/MatlabFiles/fn_mimfgraph.m b/MatlabFiles/fn_mimfgraph.m
index 9a97509b71c1dea4db3ed7613810b32f6c05d1e5..f21aecd167a6f5b655e4a74b5a7f1b2c3f61932a 100644
--- a/MatlabFiles/fn_mimfgraph.m
+++ b/MatlabFiles/fn_mimfgraph.m
@@ -19,6 +19,23 @@ function scaleout = fn_mimfgraph(imfe,nvar,q_m,imstp,xlab,ylab,tlab,xTick)
 %  scaleout: column 1 represents maximums; column 2 minimums.  Rows: nvar variables.
 %
 %  See ftd_mseriesgraph.m and fn_mseriesgraph.m
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin < 7, xTick = []; end
 
diff --git a/MatlabFiles/fn_mseriesgraph.m b/MatlabFiles/fn_mseriesgraph.m
index 10afa6543d99fb72fd816d3944b2f3d4f1d87b0b..78d3d5dcc774c5845cac74c6b59284f992852105 100644
--- a/MatlabFiles/fn_mseriesgraph.m
+++ b/MatlabFiles/fn_mseriesgraph.m
@@ -21,6 +21,23 @@ function fn_mseriesgraph(ydate,keyindx,rnum,cnum,q_m,xlab,ylab,tlab)
 %  See fn_foregraph.m, fn_forerrgraph.m.
 %
 % Tao Zha, September 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 vyrs = ydate(:,1);     % vector column
 hornum = cell(length(vyrs),1);    % horizontal year (number)
diff --git a/MatlabFiles/fn_msv_sw.m b/MatlabFiles/fn_msv_sw.m
index aa6c0ca8bfd13dbe1c57fda63e30b2fb9924a3d7..8d3756a5d9944dc357c9a94c67fe5044439e8a16 100644
--- a/MatlabFiles/fn_msv_sw.m
+++ b/MatlabFiles/fn_msv_sw.m
@@ -19,6 +19,22 @@ function [G1cell_sw, err] = fn_msv_sw(G1cell_0, A11cell, A12cell, A21cell, A22ce
 % P: ns-by-ns transition matrix with each column summing up to 1.
 %
 % See ZhaNotes on FWZ MSV solution, p. AA.1.  For the SW solution, see (7) on p. AA.1.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %--- Convergence criteria
 tol = 1.0e-09;
diff --git a/MatlabFiles/fn_mtpdf.m b/MatlabFiles/fn_mtpdf.m
index 289330dc529eca59e118ec00a3e7c9cf77a2958c..f4085fcb761dc24336c2e59007c41de220d10e58 100644
--- a/MatlabFiles/fn_mtpdf.m
+++ b/MatlabFiles/fn_mtpdf.m
@@ -17,6 +17,22 @@ function y = fn_mtpdf(x,xm,C,v,covIx,constIx)
 %      p. 382.
 %
 % Tao Zha, December 1998; Revised, January 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 [p,nx]=size(x);
 if covIx
diff --git a/MatlabFiles/fn_multigraph1.m b/MatlabFiles/fn_multigraph1.m
index cd759002775816b92e2e9581ec1345499f71ea4b..f8f96f56b9a2333af28d4b50e8a4f7d51a1786fe 100644
--- a/MatlabFiles/fn_multigraph1.m
+++ b/MatlabFiles/fn_multigraph1.m
@@ -10,6 +10,23 @@ function scaleout = fn_multigraph1(imf1,nrow,ncol,xlab,ylab,XTick,YTickIndx,scal
 %   scaleIndx:  1: enable scale along Y-axis; 0: disable
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 t = 1:nstp;
 nrow;
diff --git a/MatlabFiles/fn_multigraph1_ver2.m b/MatlabFiles/fn_multigraph1_ver2.m
index d17c4806c1fcaf0fb40da0b3bebb9bfd5baa37d4..46b422f5c156f5a67f5cd0d9c59da28eb8eebcd7 100644
--- a/MatlabFiles/fn_multigraph1_ver2.m
+++ b/MatlabFiles/fn_multigraph1_ver2.m
@@ -15,6 +15,23 @@ function scaleout = fn_multigraph1_ver2(imf1,xlab,ylab,tstring,XTick,YTickIndx,s
 %   ncolg: number of columns in the graph
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 nrow = size(imf1,2);
 ncol = size(imf1,3);
diff --git a/MatlabFiles/fn_multigraph1_ver2_all_labels.m b/MatlabFiles/fn_multigraph1_ver2_all_labels.m
index 8fe25c3c420a0be7523abc3977db02fd4fa36c47..4d359fcb1b73245efc98724ecb24d39deca9ade0 100644
--- a/MatlabFiles/fn_multigraph1_ver2_all_labels.m
+++ b/MatlabFiles/fn_multigraph1_ver2_all_labels.m
@@ -14,6 +14,23 @@ function scaleout = fn_multigraph1_ver2_all_labels(imf1,xlab,ylab,tstring,XTick,
 %   ncolg: number of columns in the graph
 %
 %  See fn_multigraph1_ver2, imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 nrow = size(imf1,2);
 ncol = size(imf1,3);
diff --git a/MatlabFiles/fn_multigraph2.m b/MatlabFiles/fn_multigraph2.m
index 4c2d574abce2b6368c0fa64e6bbc0247b2fe159e..4fe7e3f853a6644e95344be9895ad378bcd32e9d 100644
--- a/MatlabFiles/fn_multigraph2.m
+++ b/MatlabFiles/fn_multigraph2.m
@@ -11,6 +11,23 @@ function scaleout = fn_multigraph2(imf1,imf2,...
 %   scaleIndx:  1: enable scale along Y-axis; 0: disable
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 t = 1:nstp;
 nrow
 ncol
diff --git a/MatlabFiles/fn_multigraph2_ver2.m b/MatlabFiles/fn_multigraph2_ver2.m
index 9c2d765fb8bc0e0ff88119a8a998d8433341eb2e..3781941c587ba82047b6b8481586293fc156f116 100644
--- a/MatlabFiles/fn_multigraph2_ver2.m
+++ b/MatlabFiles/fn_multigraph2_ver2.m
@@ -14,6 +14,23 @@ function scaleout = fn_multigraph2(imf1,imf2,...
 %   ncolg: number of columns in the graph
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 nrow = size(imf1,2);
 ncol = size(imf1,3);
diff --git a/MatlabFiles/fn_multigraph2_ver2_all_labels.m b/MatlabFiles/fn_multigraph2_ver2_all_labels.m
index 6ec46b7dadafc426fdc85e524e0111907d07d089..9dbcd7b322079f55690f814c8d1d805df572cf7f 100644
--- a/MatlabFiles/fn_multigraph2_ver2_all_labels.m
+++ b/MatlabFiles/fn_multigraph2_ver2_all_labels.m
@@ -18,6 +18,23 @@ function scaleout = fn_multigraph2_ver2_all_labels(imf1,imf2,...
 %   ncolg: number of columns in the graph (valid when the 3rd D is one)
 %
 %  See fn_multigraph2_ver2, imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 nrow = size(imf1,2);
 ncol = size(imf1,3);
diff --git a/MatlabFiles/fn_multigraph2_ver2_all_labels_dates.m b/MatlabFiles/fn_multigraph2_ver2_all_labels_dates.m
index 1bcbeb0f7ee40fa1ca32a69450e20cba77b68c5c..1352c0db4008cab61d02ea13364b926b78bb945d 100644
--- a/MatlabFiles/fn_multigraph2_ver2_all_labels_dates.m
+++ b/MatlabFiles/fn_multigraph2_ver2_all_labels_dates.m
@@ -20,6 +20,24 @@ function scaleout = fn_multigraph2_ver2_all_labels_dates(dates,imf1,imf2,...
 %   ncolg: number of columns in the graph (valid when the 3rd D is one)
 %
 %  See fn_multigraph2_ver2_all_labels.m, fn_multigraph2_ver2, imrgraph, imcerrgraph, imrerrgraph
+
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imf1,1);
 nrow = size(imf1,2);
 ncol = size(imf1,3);
diff --git a/MatlabFiles/fn_multigraphn_3g_shadedbands.m b/MatlabFiles/fn_multigraphn_3g_shadedbands.m
index 4a68388d53c4d78eaf15d38277e3b328a3a86d5d..6b21b3a12e5952f75c731a07c9d321d66ccc2517 100644
--- a/MatlabFiles/fn_multigraphn_3g_shadedbands.m
+++ b/MatlabFiles/fn_multigraphn_3g_shadedbands.m
@@ -17,6 +17,23 @@ function scaleout = fn_multigraphn_3g_shadedbands(imfn,...
 %   ncolg: number of columns in the graph
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imfn,1);
 nrow = size(imfn,2);
 ncol = size(imfn,3);
diff --git a/MatlabFiles/fn_multigraphn_ver2.m b/MatlabFiles/fn_multigraphn_ver2.m
index eb5cb597452c49b2cc31d8398d7ceac282578cc8..a6bd030e1604006f8a88b839bc2f8b28eaa22e7f 100644
--- a/MatlabFiles/fn_multigraphn_ver2.m
+++ b/MatlabFiles/fn_multigraphn_ver2.m
@@ -15,6 +15,23 @@ function scaleout = fn_multigraphn_ver2(imfn,...
 %   ncolg: number of columns in the graph
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 nstp = size(imfn,1);
 nrow = size(imfn,2);
 ncol = size(imfn,3);
diff --git a/MatlabFiles/fn_nmlzvar.m b/MatlabFiles/fn_nmlzvar.m
index 09ca589cab7c92abac659afbc6f54de62e411c8a..51c7f25f9fee564967be491684b85dea8a76f477 100644
--- a/MatlabFiles/fn_nmlzvar.m
+++ b/MatlabFiles/fn_nmlzvar.m
@@ -28,6 +28,22 @@ function [A0n,a0dpindx,nswitch,A0inn] = fn_nmlzvar(A0u,A0xhat,A0inxhat,IndxNmlr,
 % 1/3/00: added IndxNmlr(6) so that previous programs may not be compatible.
 % 10/11/01:  added a0dpindx in front of nswitch as an output argument so that previous programs may not be compatible.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 A0inn = [];    % no output for normalized A0in unless IndxNmlr(5)
diff --git a/MatlabFiles/fn_numstruct2numcell_nummatrix.m b/MatlabFiles/fn_numstruct2numcell_nummatrix.m
index b9485ae13061545a26353af879cf32a22ede27b8..3f530d2ef95b8a60e4b4a190fe601ee9fbc430e5 100644
--- a/MatlabFiles/fn_numstruct2numcell_nummatrix.m
+++ b/MatlabFiles/fn_numstruct2numcell_nummatrix.m
@@ -7,6 +7,22 @@ function [uniform_cell, uniform_matrix3D, names_fields] = fn_numstruct2numcell_n
 % Outputs:
 %    uniform_cell:      nfields cells where each cell has a nrows-by-ncols matrix.  
 %    uniform_matrix3D: 3-D array: nrows-by-ncols-by-nfields
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 names_fields = fieldnames(uniform_ps);
 nfields = length(names_fields); 
diff --git a/MatlabFiles/fn_ols.m b/MatlabFiles/fn_ols.m
index fae2d8727957bdbe21dc3d167585d13f07f5cabb..33d4c5762733e72dcdfa9c4cdcf807c25f25b281 100644
--- a/MatlabFiles/fn_ols.m
+++ b/MatlabFiles/fn_ols.m
@@ -12,7 +12,26 @@ function [Bh,e,xtx,xty] = fn_ols(y,phi)
 %                                                 deterministic terms)%
 %          See also sye.m and syed.m
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
+
 % ** setup of orders and lengths **
+
 [u d v]=svd(phi,0); %trial
 %xtx = phi'*phi;      % X'X, k*k (ncoe*ncoe)
 vd=v.*(ones(size(v,2),1)*diag(d)'); %trial
diff --git a/MatlabFiles/fn_plotrecessionshades57_01.m b/MatlabFiles/fn_plotrecessionshades57_01.m
index e0008bc763e27e870797f6513811fcb68bf3331a..bebb443441579b75979f157d6bc0c4ed282212a9 100644
--- a/MatlabFiles/fn_plotrecessionshades57_01.m
+++ b/MatlabFiles/fn_plotrecessionshades57_01.m
@@ -3,6 +3,22 @@ function fn_PlotRecessionShades57_01(rec_dates, AxisDat)
 % Inputs: rec_dates -- must be in pairs for rectangle to work.
 %         AxisDat -- example:  AxisDat=axis([1976 2010 -.2 .15]);
 %                      1976 will automatically cut off the dates before 1976 in the following lines.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 for RecessionNumber=1:length(rec_dates);
     rectangle('Position', [rec_dates(RecessionNumber,1) AxisDat(3) (rec_dates(RecessionNumber,2)-rec_dates(RecessionNumber,1)) (AxisDat(4)-AxisDat(3))], 'FaceColor','y');
diff --git a/MatlabFiles/fn_posteriorvariancedecomposition.m b/MatlabFiles/fn_posteriorvariancedecomposition.m
index 1d1cfc390f027373d1485a761eed573ff0662f97..b091ae1e61ba2da4e5e107efe3b05abbad64b44a 100644
--- a/MatlabFiles/fn_posteriorvariancedecomposition.m
+++ b/MatlabFiles/fn_posteriorvariancedecomposition.m
@@ -10,6 +10,22 @@ function [VarXAll, E_YVarXGivenY, Var_YEXGivenY] = fn_PosteriorVarianceDecomposi
 % Mathematically and numerically, it must be that VarXAll = E_YVarXGivenY + Var_YEXGivenY.
 %
 % Written by T. Zha, October 2009
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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_ydraws = size(xydraws,2);
 if (nargin==1), probs = (1/n_ydraws)*ones(n_ydraws,1); end
diff --git a/MatlabFiles/fn_printmatrix4tex.m b/MatlabFiles/fn_printmatrix4tex.m
index d13ca1945dcaee1a1f8cc98477e855e401568796..c7e8b432eb3eab23ee61ec38cccf98b9f75dada8 100644
--- a/MatlabFiles/fn_printmatrix4tex.m
+++ b/MatlabFiles/fn_printmatrix4tex.m
@@ -9,6 +9,23 @@ function fn_printmatrix4tex(M, nrows, ncols, indxFloat)
 %               2 if single;
 %               3 if only 2 significant digits
 %               0 if integer.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nrows~=size(M,1)
    error('fn_fprintmatrix(): Make sure the row number supplied match that of the matrix');
diff --git a/MatlabFiles/fn_printmatrix4tex_ver2.m b/MatlabFiles/fn_printmatrix4tex_ver2.m
index 21da908e4a06b76337b68802de8c40ecbfeb9947..ef0cdc37c236c3164c12375f55f94df4c2554f3f 100644
--- a/MatlabFiles/fn_printmatrix4tex_ver2.m
+++ b/MatlabFiles/fn_printmatrix4tex_ver2.m
@@ -13,6 +13,23 @@ function fn_printmatrix4tex_ver2(M, nrows, ncols, indxFloat)
 %               0 if integer.
 %               1001 if double and %.16e
 %               1002 if single and %.8e
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nrows~=size(M,1)
    error('fn_fprintmatrix(): Make sure the row number supplied match that of the matrix');
diff --git a/MatlabFiles/fn_readrecessiondates57_01.m b/MatlabFiles/fn_readrecessiondates57_01.m
index 72fd1f92a67bef8ad332b01fd99cf9d7093afc07..d75c90dfd38608f110490e2f1ac418ec34775faa 100644
--- a/MatlabFiles/fn_readrecessiondates57_01.m
+++ b/MatlabFiles/fn_readrecessiondates57_01.m
@@ -2,6 +2,22 @@ function rec_dates = fn_ReadRecessionDates57_01()
 % Recession dates.  For some reasons, Matlab code will only take pairs of rec_dates when using rectangle.
 % Note that -1 in the following is for the graph lie in the correct position.
 %   For example, 1961+(1-1)/12 means Jan 1961 plotted right at 1961.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 rec_dates=[
     1957+(7-1)/12 1958+(3-1)/12
diff --git a/MatlabFiles/fn_reset_ini_seed.m b/MatlabFiles/fn_reset_ini_seed.m
index dcba439f8eb030a007891ee244f257b5b0095beb..f0db11e51d8cae2be7c5a7cf6233439da9f004b0 100644
--- a/MatlabFiles/fn_reset_ini_seed.m
+++ b/MatlabFiles/fn_reset_ini_seed.m
@@ -3,6 +3,22 @@ function fn_reset_ini_seed(seednumber)
 %
 % After Matlab starts, run this function to reset the seed number; otherwise, Matlab automatically resets to the same initial seed.
 % seednumber:  0 -- random state reset to the clock time;
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 seednumber
    randn('state',seednumber);
diff --git a/MatlabFiles/fn_rlrpostr.m b/MatlabFiles/fn_rlrpostr.m
index a3ea1bf717e8adede02faaabe7736b1839061c2d..4350f99300455d7816e240aacad91251bd381147 100644
--- a/MatlabFiles/fn_rlrpostr.m
+++ b/MatlabFiles/fn_rlrpostr.m
@@ -33,6 +33,23 @@ function [P,H0inv,Hpinv] = fn_rlrpostr(xtx,xty,yty,Ptld,H0invtld,Hpinvtld,Ui,Vi)
 %          g_i = V_i*A+(:,i) in the ith equation.
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 nvar = size(yty,1);
 
diff --git a/MatlabFiles/fn_rlrprior.m b/MatlabFiles/fn_rlrprior.m
index a6df3fc5b3a9664fdd0f91da3b8e70cbb2cd5150..ad7f0e5e3920a53e14961abaf2019418d884e458 100644
--- a/MatlabFiles/fn_rlrprior.m
+++ b/MatlabFiles/fn_rlrprior.m
@@ -26,6 +26,22 @@ function [Ptld,H0invtld,Hpinvtld] = fn_rlrprior(Ui,Vi,Pi,H0multi,Hpmulti,nvar)
 % Hpinvtld: cell(nvar,1). Transformed inv covaraince for g_i, the free parameters in A+(:,i);
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 Ptld = cell(nvar,1); % tld: tilda
 H0invtld = cell(nvar,1);  % H0 for different equations under linear restrictions
diff --git a/MatlabFiles/fn_rnrprior.m b/MatlabFiles/fn_rnrprior.m
index b039d2874d5158c5d05f1c79177513c4d6b3f597..c431895989446b31d7feace5729f18a9dae2307a 100644
--- a/MatlabFiles/fn_rnrprior.m
+++ b/MatlabFiles/fn_rnrprior.m
@@ -38,6 +38,22 @@ function [Pi,H0multi,Hpmulti,H0invmulti,Hpinvmulti] ...
 %
 % Tao Zha, February 2000.  Revised, September 2000.
 % See fn_dataxy.m for using mu(5) and mu(6).
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin==5, nexo=1; end
diff --git a/MatlabFiles/fn_rnrprior2.m b/MatlabFiles/fn_rnrprior2.m
index ecb9a70d3ac5a98e15a67afb5bf7de852b615fca..fd7c332d86d4972166e76eeb46cb472b73952a37 100644
--- a/MatlabFiles/fn_rnrprior2.m
+++ b/MatlabFiles/fn_rnrprior2.m
@@ -34,6 +34,22 @@ function [Pi,H0multi,Hpmulti,H0invmulti,Hpinvmulti] ...
 %
 % Tao Zha, February 2000.  Revised, September 2000.
 % See fn_dataxy2.m for using dummy hyperparameters mu5 and mu6.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin==5, nexo=1; end
diff --git a/MatlabFiles/fn_rnrprior_covres.m b/MatlabFiles/fn_rnrprior_covres.m
index 9d7b6f59f781d998fba73edea8a3f2526bf5f2bc..9d84cc8873762daae7b5273354729fbbffbe6f65 100644
--- a/MatlabFiles/fn_rnrprior_covres.m
+++ b/MatlabFiles/fn_rnrprior_covres.m
@@ -47,6 +47,22 @@ function [Pi,H0multi,Hpmulti,H0invmulti,Hpinvmulti] ...
 % Hpinvmulti: ncoef-by-ncoef-by-nvar; inv(H+) for different equations under asymmetric prior
 %
 % Tao Zha, February 2000.  Revised, September 2000, February 2003.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/fn_rnrprior_covres_dobs.m b/MatlabFiles/fn_rnrprior_covres_dobs.m
index 53a721343cd1f0450e569dd2ddd606fa9f6b6a41..e0f7b3b4ae55c9b639e09b4f7f6240e112e22170 100644
--- a/MatlabFiles/fn_rnrprior_covres_dobs.m
+++ b/MatlabFiles/fn_rnrprior_covres_dobs.m
@@ -51,6 +51,22 @@ function [Pi,H0multi,Hpmulti,H0invmulti,Hpinvmulti,sgh] ...
 %
 % Tao Zha, February 2000.  Revised, September 2000, February, May 2003.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin<=8), nexo=1; end
diff --git a/MatlabFiles/fn_rnrprior_covres_dobs_tv.m b/MatlabFiles/fn_rnrprior_covres_dobs_tv.m
index 6ac06952314a0b7cd1d46aaf0ae319a57c7eedf1..e89ccd480a5d8a78d680f383a0829c56c568f86c 100644
--- a/MatlabFiles/fn_rnrprior_covres_dobs_tv.m
+++ b/MatlabFiles/fn_rnrprior_covres_dobs_tv.m
@@ -66,6 +66,22 @@ function [Pi_bar,H0tldcell_inv,Hptldcell_inv] ...
 %         ri*ti-by-ri*ti.The inverse of Hptld on p.60.
 %
 % Tao Zha, February 2000.  Revised, September 2000, 2001, February, May 2003.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin<=11, nexo=1; end   % <<>>1
diff --git a/MatlabFiles/fn_rnrprior_covres_dobs_tv2.m b/MatlabFiles/fn_rnrprior_covres_dobs_tv2.m
index 88f56653c24711d4d00218b71a8eac804240d17d..745f8adb678aaf4794771ad6a1351ddba9af9886 100644
--- a/MatlabFiles/fn_rnrprior_covres_dobs_tv2.m
+++ b/MatlabFiles/fn_rnrprior_covres_dobs_tv2.m
@@ -72,6 +72,22 @@ function [Pi_bar,H0tldcell_inv,Hptldcell_inv] ...
 % Differs from fn_rnrprior_covres_dobs_tv():  allows an option to scale up the prior variance by nStates or not scale at all.
 %                so that the prior value is the same as the constant VAR when the parameters in all states are the same.
 % Tao Zha, February 2000.  Revised, September 2000, 2001, February, May 2003, May 2004.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin<=12, nexo=1; end   % <<>>1
diff --git a/MatlabFiles/fn_rnrprior_covres_tv.m b/MatlabFiles/fn_rnrprior_covres_tv.m
index ae9033fe45a740eef830d3d3028327875c44edaf..eb5935f9448e57de0c4361bd29c4e4c571579986 100644
--- a/MatlabFiles/fn_rnrprior_covres_tv.m
+++ b/MatlabFiles/fn_rnrprior_covres_tv.m
@@ -64,6 +64,22 @@ function [Pi_bar,H0tldcell_inv,Hptldcell_inv] ...
 %         ri*ti-by-ri*ti.The inverse of Hptld on p.60.
 %
 % Tao Zha, February 2000.  Revised, September 2000, 2001, February, May 2003.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin==10, nexo=1; end   % <<>>1
diff --git a/MatlabFiles/fn_rnrprior_tv.m b/MatlabFiles/fn_rnrprior_tv.m
index 0011420a4ea019a25e5573f6d96d5580d31780a1..3b7c4414a730fc8eca5e053b18c4c95cfdb4d4b4 100644
--- a/MatlabFiles/fn_rnrprior_tv.m
+++ b/MatlabFiles/fn_rnrprior_tv.m
@@ -52,6 +52,22 @@ function [Pi_bar,H0tldcell_inv,Hptldcell_inv] ...
 %
 % Tao Zha, February 2000.  Revised, September 2000, 2001.
 % See fn_dataxy.m for using mu(5) and mu(6).
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin==8, nexo=1; end   % <<>>1
diff --git a/MatlabFiles/fn_seriesgraph.m b/MatlabFiles/fn_seriesgraph.m
index 137fd5aac7933ff4e82d22f5df1faeb81c09ab85..2a252e8d97e6ecd4b93df691ebff1688a49b2c52 100644
--- a/MatlabFiles/fn_seriesgraph.m
+++ b/MatlabFiles/fn_seriesgraph.m
@@ -16,6 +16,22 @@ function fn_seriesgraph(ydate,keyindx,rnum,cnum,q_m,xlab,ylab,tlab)
 %  See fn_foregraph.m, fn_forerrgraph.m.
 %
 % Tao Zha, September 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 vyrs = ydate(:,1);     % vectorized
 hornum = cell(length(vyrs),1);    % horizontal year (number)
diff --git a/MatlabFiles/fn_simul.m b/MatlabFiles/fn_simul.m
index 92f9cb10fe5f44bcbc291a3fe65959ad4766c1be..9d3d8d83105c6e76a5e1d3fe854ff06c2c23fbd2 100644
--- a/MatlabFiles/fn_simul.m
+++ b/MatlabFiles/fn_simul.m
@@ -9,6 +9,22 @@ function simul = fn_simul(G1, impact, nsim, shocks, x0);
 % Outputs:
 %  simul: nsim-by-n.  
 %
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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,r] = size(impact);
 
diff --git a/MatlabFiles/fn_tran_a2b.m b/MatlabFiles/fn_tran_a2b.m
index b1dec61ec519f38af7277b3289480317dd6d9e98..b8ca8ddd690073a0d76ba7ccd26e08351e2a6110 100644
--- a/MatlabFiles/fn_tran_a2b.m
+++ b/MatlabFiles/fn_tran_a2b.m
@@ -16,6 +16,22 @@ function b = fn_tran_a2b(A0,Ui,nvar,n0)
 % b: sum(n0)-by-1 vector of A0 free parameters
 %
 % Tao Zha, February 2000.  Revised, August 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 n0=n0(:);
 n0cum = [0; cumsum(n0)];
diff --git a/MatlabFiles/fn_tran_b2a.m b/MatlabFiles/fn_tran_b2a.m
index 47bc8cfce50e61e1c216b9761f30aff39b05c5d3..4cc95b6623c7d4f49d1f17f7a99c549dc052a4da 100644
--- a/MatlabFiles/fn_tran_b2a.m
+++ b/MatlabFiles/fn_tran_b2a.m
@@ -15,6 +15,22 @@ function A0 = fn_tran_b2a(b,Ui,nvar,n0)
 % A0: nvar-by-nvar, contempareous matrix (columns correspond to equations)
 %
 % Tao Zha, February 2000.  Revised, August 2000.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 b=b(:);  n0=n0(:);
 A0 = zeros(nvar);
diff --git a/MatlabFiles/fn_tran_f2g.m b/MatlabFiles/fn_tran_f2g.m
index c90bec1d581ab1c6b5dca9481d2a11f4c5ec7c23..6bc2a6b3647cdb31d44fe008c8f79c345e099b03 100644
--- a/MatlabFiles/fn_tran_f2g.m
+++ b/MatlabFiles/fn_tran_f2g.m
@@ -17,6 +17,22 @@ function g = fn_tran_f2g(F,Vi,nvar,np)
 % g: sum(np)-by-1 stacked vector of all free lagged parameters A+.
 %
 % August 2000, Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 np=np(:);
 npcum = [0;cumsum(np)];
diff --git a/MatlabFiles/fn_tran_g2f.m b/MatlabFiles/fn_tran_g2f.m
index c95d2fba431687f22a34769bd577c0c906d81a5a..2e6a2cd28f9851b9fbc4fab9ab74c547268e341e 100644
--- a/MatlabFiles/fn_tran_g2f.m
+++ b/MatlabFiles/fn_tran_g2f.m
@@ -16,6 +16,22 @@ function F = fn_tran_g2f(g,Vi,nvar,ncoef,np)
 % F: ncoef-by-nvar matrix of original lagged parameters A+.  Column corresponding to equation.
 %
 % August 2000, Tao Zha.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 g=g(:); np=np(:);
 npcum = [0;cumsum(np)];
diff --git a/MatlabFiles/fn_uncondfcst_var1.m b/MatlabFiles/fn_uncondfcst_var1.m
index e8aa61d16c61ef9b51ac5ac23add0223d73aeb6b..7aab8e0d5a68569b9a310ffc0a0bc1095821b745 100644
--- a/MatlabFiles/fn_uncondfcst_var1.m
+++ b/MatlabFiles/fn_uncondfcst_var1.m
@@ -9,6 +9,22 @@ function y = fn_uncondfcst_var1(G1, y0, nsteps);
 %  y: nsteps-by-n unconditional forecasts.
 %
 % See fn_vds.m, fn_irf_var1.m.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 = length(y0);
 
diff --git a/MatlabFiles/fn_varoots.m b/MatlabFiles/fn_varoots.m
index 43410e3e0f9c9bffcd85cffa659b4f64af981296..2c342bc37b5d58be4705637108e076fc47144302 100644
--- a/MatlabFiles/fn_varoots.m
+++ b/MatlabFiles/fn_varoots.m
@@ -14,6 +14,22 @@ function rootsinv = fn_varoots(Bhat,nvar,lags)
 % rootsinv:  a vector of nvar*lags inverse roots.  When > 1, explosive.  When all < 1, stationary.
 %
 % Tao Zha, September 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(Bhat,1)<nvar*lags
diff --git a/MatlabFiles/fn_vds.m b/MatlabFiles/fn_vds.m
index 5215f39ba052608aed7cfb420b342a5ad9119b41..cf5b64ea80a8d86e10d528da59c6ab0b4f89e61a 100644
--- a/MatlabFiles/fn_vds.m
+++ b/MatlabFiles/fn_vds.m
@@ -6,6 +6,22 @@ function vds = fn_vds(irfs);
 %---
 % Outputs:
 %  vds: nsteps-by-n-by-r.  For each shock of r shocks, variance decompositions (%) are nsteps-by-n.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 [nsteps, n,r] = size(irfs);
 
diff --git a/MatlabFiles/fn_vds_abs.m b/MatlabFiles/fn_vds_abs.m
index d5818e211cdd12f9d9db3f7eb137c5afc3b3e5bb..d6ede7c5b7c398a3b0388d908359f8ef1d917634 100644
--- a/MatlabFiles/fn_vds_abs.m
+++ b/MatlabFiles/fn_vds_abs.m
@@ -6,6 +6,22 @@ function vds = fn_vds_abs(irfs);
 %---
 % Outputs:
 %  vds: nsteps-by-n-by-r.  For each shock of r shocks, variance decompositions (%) are nsteps-by-n.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 [nsteps, n,r] = size(irfs);
 
diff --git a/MatlabFiles/fore_cal.m b/MatlabFiles/fore_cal.m
index b65c5761546df1213f5c6699e3d7004213a11e5d..0dc5b147a3f970c65844cfdc288f8647168029ab 100644
--- a/MatlabFiles/fore_cal.m
+++ b/MatlabFiles/fore_cal.m
@@ -32,7 +32,23 @@ function [yforelml,yforemgml,yforeqgml,yforeCalygml] = fore_cal(yfore,xdata,nvar
 %
 % Copyright (c) March 1998 by Tao Zha
 % Revision, October 1998.  Added lmyqIndx so previous programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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/>.
+
 
 %=================================================
 %  Making everything presentable at FOMC
diff --git a/MatlabFiles/fore_gh.m b/MatlabFiles/fore_gh.m
index bb808d2cd3569e710735cb3ce2a96baf7ab6b008..daec61bdeb6669efba0f57d27cd382d2d6d47b5c 100644
--- a/MatlabFiles/fore_gh.m
+++ b/MatlabFiles/fore_gh.m
@@ -49,6 +49,22 @@ function [yactCalyg,yforeCalygml,yAg,yFg,yactqg,yforeqgml,qAg,qFg,...
 %     (actup+forep)-by-nvar, which include some actual data in the 1st calendar year.
 %
 % Copyright (c) March 1998 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 xdata=xinput{1}; nvar=xinput{2}; nSample=xinput{3}; nSampleCal=xinput{4};
diff --git a/MatlabFiles/fore_mqy.m b/MatlabFiles/fore_mqy.m
index 9bbdbe120ad1b501fd97b36410cc1c5ab48a1d87..6759e1be280d636ee5932ef8276593bd8a8eff06 100644
--- a/MatlabFiles/fore_mqy.m
+++ b/MatlabFiles/fore_mqy.m
@@ -46,6 +46,22 @@ function [yforelml,yforemgml,yforeqgml,yforeCalygml,yactl,yactmg,yactqg,yactCaly
 % Revised, 3/23/99.  Added "lmqyIndx" so that previous programs may not be compatible.
 % Revised, 4/27/99.  Added "indxCal" so that previous programs may not be compatible.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %=================================================
 %  Making everything presentable at FOMC
diff --git a/MatlabFiles/forecast.m b/MatlabFiles/forecast.m
index 96f0680281f24a7b96bea563f38e672b200d19ae..e39d8e43a6c5e683423bcd2907cc8ef0fe1e69fc 100644
--- a/MatlabFiles/forecast.m
+++ b/MatlabFiles/forecast.m
@@ -8,6 +8,22 @@ function yhat = forecast(Bh,phi,nn)
 %                (last period plus lags before the beginning of forecast);
 %        nn: [nvar,lags,forep], forep: forecast periods;
 %        yhat: forep*nvar.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup
 nvar = nn(1);
diff --git a/MatlabFiles/forecasterr.m b/MatlabFiles/forecasterr.m
index dca4c3d1c8c57b5855ce110f5791dd3a36925ef1..7ee0e2b6198e4b8c65f7d1fc0fd5a997d7d64ef7 100644
--- a/MatlabFiles/forecasterr.m
+++ b/MatlabFiles/forecasterr.m
@@ -9,6 +9,22 @@ function yhat = forecasterr(A0hin,Bh,phi,nn)
 %        yhat: forep*nvar.
 %
 % See fsim.m when A0h (rather than A0hin) is used.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup
 nvar = nn(1);
diff --git a/MatlabFiles/forefixe.m b/MatlabFiles/forefixe.m
index 71c9c8fddab70eb35ee2287d3fb5c95859e8ef16..60834432d9014e8d74e1f20959573e3ce98147f1 100644
--- a/MatlabFiles/forefixe.m
+++ b/MatlabFiles/forefixe.m
@@ -12,6 +12,22 @@ function yhat = forefixe(A0h,Bh,phi,nn,Estr)
 %        yhat: forep*nvar;
 %
 % For reduced-form shocks, see fshock.m
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup
 nvar = nn(1);
diff --git a/MatlabFiles/fshock.m b/MatlabFiles/fshock.m
index d3d4a0d704e205a07abcd773328362e82e3d7a36..a5799576862a1b5307e41e0bd42fe56bd2ac3645 100644
--- a/MatlabFiles/fshock.m
+++ b/MatlabFiles/fshock.m
@@ -11,6 +11,22 @@ function yhat = fshock(Bh,phi,shock,nn)
 %        yhat: forep-by-nvar.
 %
 % For structural shocks, see forefixe.m
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup
 nvar = nn(1);
diff --git a/MatlabFiles/fsim.m b/MatlabFiles/fsim.m
index 0b55d9f969716c09c586c9d9a8ec3c3a8f0ce31b..e01da891c1df8693522654ac5bd3f2b12cbe06cf 100644
--- a/MatlabFiles/fsim.m
+++ b/MatlabFiles/fsim.m
@@ -14,6 +14,22 @@ function yhat = fsim(Bh,A0h,phi,nn)
 %     check.
 %
 % See forecasterr.m when A0h_in (instead of A0h) is used.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup
 nvar = nn(1);
diff --git a/MatlabFiles/gactual.m b/MatlabFiles/gactual.m
index c9f3ffea0b65b15115113cae4f50933ea17e77f9..0765333594b5fcda8a5f79279bee6119a920498c 100644
--- a/MatlabFiles/gactual.m
+++ b/MatlabFiles/gactual.m
@@ -26,6 +26,22 @@ function actual = gactual(begy,begm,begq,finy,finm,finq,ylab,mqyIndx,idfile)
 %                               with parac.m.
 %
 % October 1998 by Tao A. Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 eval(['load ' idfile '.mat']);
diff --git a/MatlabFiles/gaf.m b/MatlabFiles/gaf.m
index 73fb5b9bfe3e81593b9981f56ecd37186c74db0b..83cdc906d0dc6f7704cc859049afb364bb262d2d 100644
--- a/MatlabFiles/gaf.m
+++ b/MatlabFiles/gaf.m
@@ -24,6 +24,22 @@ function gaf(yrEnd,qmEnd,q_m,yearsCal,yactCalyg,forepy,...
 %
 % October 1998 Tao Zha; revised, 03/20/99
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/gaferr1.m b/MatlabFiles/gaferr1.m
index 14c4006ededec3cfb6bdb3f876e4c1e883133bc7..d9730c1ea148630e8e70f6310c1f9e8c77978f6e 100644
--- a/MatlabFiles/gaferr1.m
+++ b/MatlabFiles/gaferr1.m
@@ -26,6 +26,22 @@ function gaferr1(yrEnd,qmEnd,q_m,yearsCal,yactCalyg,forepy,yhatCalygml,yhatCalyg
 %
 % 03/19/99
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 %*** Begining period
diff --git a/MatlabFiles/gampar.m b/MatlabFiles/gampar.m
index bd0ab9597997e29f784c22e11403ee3c940809c0..e80d80b8e081ec4842f4db80c71c3bc49e46dc84 100644
--- a/MatlabFiles/gampar.m
+++ b/MatlabFiles/gampar.m
@@ -3,6 +3,22 @@ function f = gampar(ab, XLO, XUP, PLO, PUP);
 % The function takes as inputs the parameters ab=[a, b] of the gamma
 % distribution, the bounds of the support [XLO, XUP], the the corresponding
 % probability of the bounds [PLO, PUP] and returns the residual value f.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 a = abs(ab(1)); b = abs(ab(2));  % abs() is used to allow continuous search for the fsolve function find_gampar.m.
 f1 = PLO - gamcdf(XLO, a, 1/b);  %Note that in Matlab, it is 1/b, NOT b.
diff --git a/MatlabFiles/gensys.m b/MatlabFiles/gensys.m
index c533a0eb5c136f0354ffb185ab147f1be2ccda90..2914a55d42967a35a5b423e6610d630ad9fc273f 100644
--- a/MatlabFiles/gensys.m
+++ b/MatlabFiles/gensys.m
@@ -11,6 +11,23 @@ function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div)
 % existence only with not-s.c. z; eu=[-2,-2] for coincident zeros.
 % By Christopher A. Sims
 % Corrected 10/28/96 by CAS
+% Copyright (C) 1996-2012 Christopher A. 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/>.
+
 eu=[0;0];
 realsmall=1e-6;
 fixdiv=(nargin==6);
diff --git a/MatlabFiles/gensys_z2.m b/MatlabFiles/gensys_z2.m
index dd53ef8cd60e35679751cedbc5e180b336e779ad..7a47757d209435df05ade14f06ca14439a752fb1 100644
--- a/MatlabFiles/gensys_z2.m
+++ b/MatlabFiles/gensys_z2.m
@@ -14,6 +14,23 @@ function [z2,eu2]=gensys_z2(g0,g1,c,psi,gpi,div)
 %  eu2 = [-2,-2] for coincident zeros.
 % By Christopher A. Sims
 % Corrected 10/28/96 by CAS
+% Copyright (C) 1997-2012 Christopher A. 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/>.
+
 eu2=NaN*ones(2,1);
 realsmall=1e-6;
 fixdiv=(nargin==6);
diff --git a/MatlabFiles/gensys_z2new.m b/MatlabFiles/gensys_z2new.m
index c61c5dfe2ad65947a546e64cc885ed6f11f6eeb9..599b3ade6121435454fc119d09e226dd9685bd8d 100644
--- a/MatlabFiles/gensys_z2new.m
+++ b/MatlabFiles/gensys_z2new.m
@@ -14,6 +14,22 @@ function [z2,eu2,div]=gensys_z2new(g0,g1,c,psi,gpi)
 %  eu2 = [-2,-2] for coincident zeros.
 % By Christopher A. Sims
 % Corrected 10/28/96 by CAS
+% Copyright (C) 1997-2012 Christopher A. 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/>.
 
 eu2=NaN*ones(2,1);
 n2 = size(gpi,2);  %number of expectational errors.
diff --git a/MatlabFiles/gensysct.m b/MatlabFiles/gensysct.m
index 52c28bad87d813d3c5b7311fcf7c9b8f8ef09a87..13c053c15d45694e06a7fdfe0ac62ece83a685dc 100644
--- a/MatlabFiles/gensysct.m
+++ b/MatlabFiles/gensysct.m
@@ -19,6 +19,23 @@ function [G1,C,impact,q,a,b,z,eu]=gensysct(g0,g1,c,psi,pi,div)
 % eu(1)=(existence); eu(2)=(uniqueness). Else eu=[-2,2]  => indeterminacy via singularity
 % in the equation system.  Else eu(1)=-1 => existence only for white noise epsilon.
 % realsmall=sqrt(eps)*10;
+% Copyright (C) 1997-2012  C. A. 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;
 eu=[0;0];
diff --git a/MatlabFiles/gensysoldversion.m b/MatlabFiles/gensysoldversion.m
index 29653372492b053b0470e616052550cdcec3e03e..66cdc49907d0436df6101a8ca30e971d52d9f753 100644
--- a/MatlabFiles/gensysoldversion.m
+++ b/MatlabFiles/gensysoldversion.m
@@ -11,6 +11,23 @@ function [G1,C,impact,fmat,fwt,ywt,gev,eu]=gensys(g0,g1,c,psi,pi,div)
 % existence only with not-s.c. z; eu=[-2,-2] for coincident zeros.
 % By Christopher A. Sims
 % Corrected 10/28/96 by CAS
+% Copyright (C) 1997-2012 Christopher A. 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/>.
+
 eu=[0;0];
 realsmall=1e-6;
 fixdiv=(nargin==6);
diff --git a/MatlabFiles/gfmean.m b/MatlabFiles/gfmean.m
index ffc7c7a651996dee057593ca893da354e0fcfabb..360bb29ad82cf38da1a8500f7faf8aa0324f2909 100644
--- a/MatlabFiles/gfmean.m
+++ b/MatlabFiles/gfmean.m
@@ -21,6 +21,23 @@ function [Fmat,gvec] = gfmean(b,P,Vi,nvar,ncoef,n0,np)
 % gvec: sum(n0)-by-1 analytical gradient for a0freefun.m
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 b=b(:);
 
diff --git a/MatlabFiles/gfore.m b/MatlabFiles/gfore.m
index c04d435888ada8736883945e891a74f6e4ec3d3b..298b5e505ec264f1346feccf18440b4f5ce8cf8f 100644
--- a/MatlabFiles/gfore.m
+++ b/MatlabFiles/gfore.m
@@ -23,6 +23,22 @@ function gfore(yrEnd,qmEnd,q_m,yearsCal,yactCalyg,forepy,...
 % No output argument for this graph file
 %
 % October 1998 Tao Zha; revised, 03/17/99 -- May not be compatible with previous programs
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/gforerr1.m b/MatlabFiles/gforerr1.m
index f15a20030a9c660ab023ff973355089f0b9fdfc0..db05b11d110e6586f3533ec7d9859fa16beac274 100644
--- a/MatlabFiles/gforerr1.m
+++ b/MatlabFiles/gforerr1.m
@@ -25,6 +25,22 @@ function gforerr1(yrEnd,qmEnd,q_m,forepy,yhatCalygml,yhatCalygl1,...
 %
 % 03/19/99
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 %*** Begining period
diff --git a/MatlabFiles/ghistd.m b/MatlabFiles/ghistd.m
index 6f03aacebed28b49780c601a6f2887faf93b3bbe..d5b0f68e5b3e7223fbe36eb061ce3ba4924b2758 100644
--- a/MatlabFiles/ghistd.m
+++ b/MatlabFiles/ghistd.m
@@ -18,7 +18,23 @@ function noargout = ghistd(qmEnd,yrEnd,forepy,q_m,HDv,lendlab,titlab,ylab,timela
 % no argument out
 %
 % October 1998 Tao Zha
+%% Copyright (C) 1997-2012 Tao Zha
 %
+% 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/>.
+
 %  To be done:
 %    lengend does not work well
 %    colormap should be replaced by some non-color shading
diff --git a/MatlabFiles/gibbsglb.m b/MatlabFiles/gibbsglb.m
index 7d2238430740573e529613ef010bf61f9f3bde48..88f0a86954dada0a4f3edb200d747c34d2d520ac 100644
--- a/MatlabFiles/gibbsglb.m
+++ b/MatlabFiles/gibbsglb.m
@@ -21,6 +21,22 @@ function [cT,vR,kdf] = gibbsglb(Sbd,idmat0,nvar,fss)
 %          "gibbsvar.m"
 %
 % Written by Tao Zha; Copyright (c) 1999 by Waggoner and Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 kdf = fss;  %2;     %fss;
diff --git a/MatlabFiles/gibbsvar.m b/MatlabFiles/gibbsvar.m
index 10aa8c352183b7ca3467c194c819fa145faa3c10..5d12d432c174e66fc648f42d6ac824ef9e5dcdd8 100644
--- a/MatlabFiles/gibbsvar.m
+++ b/MatlabFiles/gibbsvar.m
@@ -19,6 +19,22 @@ function A0gbs = gibbsvar(A0gbs,cT,vR,nvar,fss,kdf,Indxcol)
 %
 % Written by Tao Zha; Copyright (c) 1999 by Waggoner and Zha
 % NOTE: Added Indxcol on 2/13/00 so that previous programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin==6), Indxcol=[1:nvar]; end
 
diff --git a/MatlabFiles/gradcd.m b/MatlabFiles/gradcd.m
index 7dbffd5c9ad81450e027798304ea65277488d465..1655d01ed0b89811a8665f152b072b3371a80fda 100644
--- a/MatlabFiles/gradcd.m
+++ b/MatlabFiles/gradcd.m
@@ -13,6 +13,23 @@ function grdd = gradcd(fcn,x0,grdh,P1,P2,P3,P4,P5,P6,P7,P8,P9,...
 %              %step = 1e-04;
 %              grdh = step * (max([abs(x) ones(length(x),1)]'))' .* (abs(x) ./ x);
 %   grdd: Jacobian matrix, k*n.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 stps = eps^(1/3);
 % eps: floating point relative accuracy or machine precision: 2.22e-16
diff --git a/MatlabFiles/gshock.m b/MatlabFiles/gshock.m
index abcd3af70b1364e6c2be49e0e969810558ad3340..492188355e740279fecc808d073dc31624f7688e 100644
--- a/MatlabFiles/gshock.m
+++ b/MatlabFiles/gshock.m
@@ -12,6 +12,22 @@ function ExactSmyear = gshock(begy,begm,finy,finm,xlab,idfile,tlinput)
 %  if no nargout, plot graphics.
 %
 % October 1998 by Tao A. Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/gstate.m b/MatlabFiles/gstate.m
index 3a0aaea5d86254e1eef8241a2a2f8eeb83b3d468..b076e5d017797062a720f5013e538ff2e3552806 100644
--- a/MatlabFiles/gstate.m
+++ b/MatlabFiles/gstate.m
@@ -22,6 +22,24 @@ function  [GS,pickn,ok,uis,uiu,vs]=gstate(G1,impact,pick)
 % uiu:   uiu'y(t)=0, and this is interpretable as the decision rule setting controls as functions of the states.
 % The solution was in the form y(t)=G1*y(t-1)+impact*z(t).  Now it's in the form y(t)=GS*pickn*y(t-1)+impact*z(t).
 % In general, pickn is mxn with m<n.
+
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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=1e-9;
 [nr,nc]=size(G1);
 %if nr<nc
diff --git a/MatlabFiles/gyrfore.m b/MatlabFiles/gyrfore.m
index a175804f85ef088676ad62be1f7670df259ff3f3..7bee2d62b5737a8622c4b8101358c1ee69ed6be9 100644
--- a/MatlabFiles/gyrfore.m
+++ b/MatlabFiles/gyrfore.m
@@ -15,6 +15,22 @@ function gyrfore(yfore,yacte,keyindx,rnum,cnum,ylab,forelabel,conlab)
 %
 % Tao Zha, March 2000
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 vyrs = yfore(:,1);
 hornum = cell(length(vyrs),1);    % horizontal year (number)
diff --git a/MatlabFiles/hesscd.m b/MatlabFiles/hesscd.m
index 45c59dfe0aea33a4344db324f9a3e78bd71deda2..99ee783c73ee01f25e5cd4e6e0df4c29b7de1073 100644
--- a/MatlabFiles/hesscd.m
+++ b/MatlabFiles/hesscd.m
@@ -7,6 +7,22 @@ function grdd = hesscd(fcn,x0,grdh,P1,P2,P3,P4,P5,P6,P7,P8,P9,...
 %   x0: a column vector n*1, at which point the hessian is evaluated.
 %   grdh: step size.
 %   grdd: hessian matrix (second derivative), n*n.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 stps = eps^(1/3);
 % eps: floating point relative accuracy or machine precision: 2.22e-16
diff --git a/MatlabFiles/hist2.m b/MatlabFiles/hist2.m
index 1ad9471819674266d24f92c272b8750414cfa119..37bea11bc62ea965ac05ed723ceb489f840cd438 100644
--- a/MatlabFiles/hist2.m
+++ b/MatlabFiles/hist2.m
@@ -22,6 +22,23 @@ function [no,xo,binwidth] = hist2(y,x)
 %   Copyright (c) 1984-97 by The MathWorks, Inc.
 %   $Revision: 5.10 $  $Date: 1997/04/08 05:22:50 $
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin == 0
     error('Requires one or two input arguments.')
 end
diff --git a/MatlabFiles/history.m b/MatlabFiles/history.m
index 43c002e9a6e9eda1b1c366b2649dff919bfef02f..4f224f32ad23ec922840cdeac9d05ed63c8e4a1a 100644
--- a/MatlabFiles/history.m
+++ b/MatlabFiles/history.m
@@ -17,6 +17,22 @@ function [hd,ehat] = history(uhat,Bh,A0,nn)
 %         nn: # of inputs -- [nvar,lags,dstp (steps of decompositions)].
 %    ===== Note: this function can be easily modified to get variance
 %    =====       decompositions and impulse responses.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nvar = nn(1);
 lags = nn(2);
diff --git a/MatlabFiles/history2.m b/MatlabFiles/history2.m
index acf86fb91860971bc3d046ae0ff0f74d56c20c07..07a7287f8c600dc58ad368d78cf53994a3572896 100644
--- a/MatlabFiles/history2.m
+++ b/MatlabFiles/history2.m
@@ -46,6 +46,22 @@ function [HDratio,HDvalue,yhatn,yforen] = history2(HDindx,A0,Bhml,phil,nn,...
 % October 1998 by Tao Zha.
 % Last change 3/19/99 on the dimension of "Estrexa" so that previous programs may not be
 %        compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nyout = 1+nargout('fore_cal');
               % +1 because we want the original logged variables as well.
diff --git a/MatlabFiles/histpdfcnt.m b/MatlabFiles/histpdfcnt.m
index 623a3498ad83a04ae75dafe34686ef329307b2cf..cffb0567556223e61b385a986e93bb47577259d8 100644
--- a/MatlabFiles/histpdfcnt.m
+++ b/MatlabFiles/histpdfcnt.m
@@ -40,6 +40,22 @@ function [imfpdf,imfpo,imfprob] = histpdfcnt(imfcnt,ndrawscnt,forep,shockp,nvar,
 % 27 August 1998 Tao Zha
 % Revised, October 1998, March 1999
 % 3/24/99, added gIndx so that the previous programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 invlength = invc ./ ninv;
 invlengthM = repmat(invlength,[2+ninv,1]);
diff --git a/MatlabFiles/histpdfg.m b/MatlabFiles/histpdfg.m
index 3148f4392ff6ed23204744bc20328befa36f0f70..8fd378c4686613e181d97d1b3038a91bf5061078 100644
--- a/MatlabFiles/histpdfg.m
+++ b/MatlabFiles/histpdfg.m
@@ -14,6 +14,22 @@ function [n,z] = histpdfg(seqdraws,binnum,titstr,xlabstr,ylabstr)
 % plot p.d.f. graph if no nargout
 %
 % October 1998 Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin==2), titstr=[]; xlabstr=[]; ylabstr=[]; end
 
diff --git a/MatlabFiles/histpdfg2d.m b/MatlabFiles/histpdfg2d.m
index d9dab9e9dd37aff4409bce2b2cf7ec61e8aef0e9..ed24a8e5277c4bf374e926398d64e41699832f82 100644
--- a/MatlabFiles/histpdfg2d.m
+++ b/MatlabFiles/histpdfg2d.m
@@ -15,6 +15,22 @@ function [xc,yc,z,zn] = histpdfg2D(w,n,ditp,xlabstr,ylabstr)
 % if nargout==0, plot 2D p.d.f. graphics
 %
 % January 1999 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(w,2)~=2)
    error('The size of 1st argument must be *-by-2 (i.e., 2 columns)')
diff --git a/MatlabFiles/histwpdfg.m b/MatlabFiles/histwpdfg.m
index bc218bbff41e0e8ddbb1a644f564827798f1430f..1daa8e555fbc5bf54d2a8a2a54c8dc10a9abe60c 100644
--- a/MatlabFiles/histwpdfg.m
+++ b/MatlabFiles/histwpdfg.m
@@ -20,6 +20,22 @@ function [xp,xpd,xc,w,bw] = histwpdfg(s,nbin,gIdx,w,xlabstr,ylabstr,titstr)
 %
 % August 1999 by Tao Zha
 % July 18 2000.  Place w after gIdx so that previous programs need modifications accordingly.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 (nargin<=4), titstr=[]; xlabstr=[]; ylabstr=[]; end
 [m,n] = size(s);
diff --git a/MatlabFiles/histwpdfg2d.m b/MatlabFiles/histwpdfg2d.m
index 249be4f453a358a651ad445f027386f7601e5fe7..8362c7d196324350c7b75f39d47948860f1c617b 100644
--- a/MatlabFiles/histwpdfg2d.m
+++ b/MatlabFiles/histwpdfg2d.m
@@ -16,6 +16,22 @@ function [xc,yc,z,zn] = histwpdfg2D(s,w,n,ditp,xlabstr,ylabstr)
 % if nargout==0, plot 2D p.d.f. graphics
 %
 % January 1999 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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(s,2)~=2)
    error('The size of 1st argument must be *-by-2 (i.e., 2 columns)')
diff --git a/MatlabFiles/imc2errgraph.m b/MatlabFiles/imc2errgraph.m
index a66255c3defecb924f8f83cf3e6faf8ac3947a95..82b19c11944731c18d06bfbb6105a4b8de509f4b 100644
--- a/MatlabFiles/imc2errgraph.m
+++ b/MatlabFiles/imc2errgraph.m
@@ -17,6 +17,23 @@ function scaleout = imc2errgraph(imf,firstl1,firsth1,...
 %     scaleout:  gives out max and min for each row of graphs
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 t = 1:imstp;
 temp1=zeros(nvar,1);
 temp2=zeros(nvar,1);
diff --git a/MatlabFiles/imcerrgraph.m b/MatlabFiles/imcerrgraph.m
index 49924fd0a9e10eeb5900f652405fcc3882af34e0..2e3b620d35e5b1ca665af38f7572b58dfdbe9dc1 100644
--- a/MatlabFiles/imcerrgraph.m
+++ b/MatlabFiles/imcerrgraph.m
@@ -10,6 +10,22 @@ function scaleout = imcerrgraph(imf,firstl,firsth,nvar,imstp,xlab,ylab)
 %     xlab,ylab:   labels
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 t = 1:imstp;
 temp1=zeros(nvar,1);
diff --git a/MatlabFiles/imcgraph.m b/MatlabFiles/imcgraph.m
index 8ecebbf08efc305d3cab9718ea29b5f8d07ef456..568daae11a27943e54dc67a38e604ab42a9e7dbd 100644
--- a/MatlabFiles/imcgraph.m
+++ b/MatlabFiles/imcgraph.m
@@ -14,6 +14,22 @@ function scaleout = imcgraph(imf,nvar,imstp,xlab,ylab,indxGimfml)
 %            older than 03/06/99, TZ
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 t = 1:imstp;
 temp1=zeros(nvar,1);
diff --git a/MatlabFiles/imfsim.m b/MatlabFiles/imfsim.m
index f4c0b15f8cdee79d81d34c2ba7254d2df9915a85..600cfc073fef56a9a1aa6196358abd6a04a4d5a1 100644
--- a/MatlabFiles/imfsim.m
+++ b/MatlabFiles/imfsim.m
@@ -56,6 +56,22 @@ function imfsim(xinput)
 % All output is saved in outB_W, including Range5, invc, ninv, and imfcntmulti
 %
 % Written by T. Zha 1999
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nfp=xinput{1}; nvar=xinput{2}; xhat=xinput{3}; hess=xinput{4}; Indxv=xinput{5};
 IndxGraph=xinput{6}; idmat0=xinput{7}; nstarts=xinput{8}; ndraws1=xinput{9}; ndraws2=xinput{10};
diff --git a/MatlabFiles/imfvdscksim.m b/MatlabFiles/imfvdscksim.m
index 879115a3e2daa0efca0e092c2b9f71218ce707e9..1d9d0df52aa4c7616d8f28a9da41e71708c3d71c 100644
--- a/MatlabFiles/imfvdscksim.m
+++ b/MatlabFiles/imfvdscksim.m
@@ -69,6 +69,23 @@ function imfvdscksim(xinput,sa0indx,simfindx)
 %      sckcorcntmulti, Avhxcntmulti, lzvdcntmulti
 %
 % Written by TAZ 1999
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 nfp=xinput{1}; nvar=xinput{2}; xhat=xinput{3}; hess=xinput{4}; Indxv=xinput{5};
 IndxGraph=xinput{6}; idmat0=xinput{7}; nstarts=xinput{8}; ndraws1=xinput{9}; ndraws2=xinput{10};
diff --git a/MatlabFiles/impgraphs.m b/MatlabFiles/impgraphs.m
index 7c8239dd553a8808bd43c06b738029fd46405a7e..e7eeadd8a2eca74a3966843b9ebee94f3cf0bfc2 100644
--- a/MatlabFiles/impgraphs.m
+++ b/MatlabFiles/impgraphs.m
@@ -1,6 +1,23 @@
 function impgraphs(response,collabel,rowlabel)
 %function impgraphs(response,collabel,rowlabel)
 % collabel and rowlabel are cell arrays with string contents
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 XTick=[12 24 36 48]; %modify this line for other time units.
 %XTickLabel=[] % Use this to suppress labeling.
 [nrow,ncol,nt]=size(response);
diff --git a/MatlabFiles/impulseo.m b/MatlabFiles/impulseo.m
index ae162ce4c12ded1208f67f7e97c38291220ff6c6..f72badda2f86ae90ca4fc1dc87a10d9bcdc4e91d 100644
--- a/MatlabFiles/impulseo.m
+++ b/MatlabFiles/impulseo.m
@@ -7,6 +7,22 @@ function imf = impulseo(Bh,swish,nn)
 %               form or dimension is the same as "Bh" from the function "sye";
 %           swish is the inv(A0) in the structural model A(L)y(t) = e(t).
 %           nn is the numbers of inputs [nvar,lags,# of impulse responses].
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nvar = nn(1);
 lags = nn(2);
diff --git a/MatlabFiles/imrgraph.m b/MatlabFiles/imrgraph.m
index b81a7576dd6ded8b8d7db447449b4f16dace4bb9..b05eab206034a9256d2be9b743fae0d04d55eacf 100644
--- a/MatlabFiles/imrgraph.m
+++ b/MatlabFiles/imrgraph.m
@@ -8,6 +8,22 @@ function scaleout = imrgraph(imf,nvar,imstp,xlab,ylab)
 %     xlab,ylab:   labels
 %
 %  See imcgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 t = 1:imstp;
 temp1=zeros(nvar,1);
diff --git a/MatlabFiles/invgamcdf.m b/MatlabFiles/invgamcdf.m
index 975c340a38204934cfe870449ab56681934ecef8..8058d644f607ce0528041e3f837ca5a7d346655d 100644
--- a/MatlabFiles/invgamcdf.m
+++ b/MatlabFiles/invgamcdf.m
@@ -14,6 +14,23 @@ function P = invgamcdf(X, a, b);
 %    G(b/x, a)/G(a) = (1-gammainc(b./X, a)).
 
 % First, check for input errors
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 X<=0;
     error('the support for the inverse gamma function needs to be positive')
 end;
diff --git a/MatlabFiles/invgampar.m b/MatlabFiles/invgampar.m
index dfb81dc3146430d7331e2c4fc125f27c309c3bf0..97b6004909d8e192f2d12cdbe23335849fbf551e 100644
--- a/MatlabFiles/invgampar.m
+++ b/MatlabFiles/invgampar.m
@@ -4,6 +4,23 @@ function f = invgampar(ab, XLO, XUP, PLO, PUP);
 % distribution, the bounds of the support [XLO, XUP], the the corresponding
 % probability of the bounds [PLO, PUP] and returns the residual value f.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 a = ab(1); b = ab(2);
 f1 = PLO - invgamcdf(XLO, a, b);
 f2 = PUP - invgamcdf(XUP, a, b);
diff --git a/MatlabFiles/lcnmean.m b/MatlabFiles/lcnmean.m
index ef6ef06db5b0d38a66e023a39cd4006ba4d23dd6..b516e1d9f6264244f05222f05f3b8da73ccbeed3 100644
--- a/MatlabFiles/lcnmean.m
+++ b/MatlabFiles/lcnmean.m
@@ -11,6 +11,22 @@ function cutmean = lcnmean(x,pnIndx)
 % cutmean: the backed-out mean for the truncated normal
 %
 % October 1998 Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 pnIndx
 	cutmean = exp(-x^2/2)/(sqrt(2*pi)*(1-cdf('norm',x,0,1)));
diff --git a/MatlabFiles/mformd.m b/MatlabFiles/mformd.m
index fa9b2eb691bfab2b1eb621afa11d38a560e3310c..5f869dc97b08f5c62e23da565e8fada1c8b60f79 100644
--- a/MatlabFiles/mformd.m
+++ b/MatlabFiles/mformd.m
@@ -6,6 +6,22 @@ function [phi,YtY] = mformd(z,nn)
 %          nn is the numbers of inputs [nvar,lags,sample period (total)];
 %          phi: Y as in the structural form YA = E, Y: T*(nvar*lags+nvar+1)
 %          YtY:  Y'Y: (nvar*lags+nvar+1)*(nvar*lags+nvar+1)
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup of orders and lengths **
 nvar = nn(1);
diff --git a/MatlabFiles/mformd1.m b/MatlabFiles/mformd1.m
index 81d86ae020fc133597a60122e2835a935300da0f..3f5f4afc4fa691c5a6b30f151268235a16c7418d 100644
--- a/MatlabFiles/mformd1.m
+++ b/MatlabFiles/mformd1.m
@@ -15,6 +15,22 @@ function [phi,y,ncoe] = mformd1(z,lags)
 % See also sye.m
 %
 % October 1998 Tao Zha.  Revised, 03/13/99
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 % ** setup of orders and lengths **
diff --git a/MatlabFiles/mnpdf.m b/MatlabFiles/mnpdf.m
index 07462fdba2090456dd92e87e2fddc588a14ba4ac..6302ca1bfb962d4491119a0410a95a162d28727e 100644
--- a/MatlabFiles/mnpdf.m
+++ b/MatlabFiles/mnpdf.m
@@ -14,6 +14,22 @@ function y = mnpdf(x,xm,C,constIx)
 %
 % November 1998 by Tao Zha
 % rewritten by CAS 12/98 to take matrix x, return vector y
+% Copyright (C) 1997-2012  Christopher A. Sims and Tao Zha 
+%
+% 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/>.
 
 [p,nx]=size(x);
 z = C\(x-xm);
diff --git a/MatlabFiles/mtpdf.m b/MatlabFiles/mtpdf.m
index 1b3dee09cceee4d07f6bf435bd9203f53512ad84..517f6ab0918b4c57178a9bb64307bde8f43af893 100644
--- a/MatlabFiles/mtpdf.m
+++ b/MatlabFiles/mtpdf.m
@@ -15,6 +15,22 @@ function y = mtpdf(x,xm,C,v,constIx)
 %      p. 382.
 %
 %   December 1998 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 [p,nx]=size(x);
 z = C\(x-xm);
diff --git a/MatlabFiles/nmlzvar.m b/MatlabFiles/nmlzvar.m
index b591a70d4daae9e84f5d95b4d1ea1a473da45ade..8a896d08bb490121dfe90928611b7b9377a1a107 100644
--- a/MatlabFiles/nmlzvar.m
+++ b/MatlabFiles/nmlzvar.m
@@ -26,6 +26,22 @@ function [A0n,nswitch,A0inn] = nmlzvar(A0u,A0xhat,A0inxhat,IndxNmlr,nswitch,A0in
 %
 % Written by Tao Zha
 % 1/3/00: added IndxNmlr(6) so that previous programs may not be compatible.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 
diff --git a/MatlabFiles/normpar.m b/MatlabFiles/normpar.m
index 7e22857243bf0c3006100a935391df75713dd176..d8ee4958a0cad0e5647f2c3345b79064d6bc9218 100644
--- a/MatlabFiles/normpar.m
+++ b/MatlabFiles/normpar.m
@@ -5,6 +5,23 @@ function f = normpar(ab, XLO, XUP, PLO, PUP);
 % support [XLO, XUP], the the corresponding probabilities of the bounds
 % [PLO, PUP] and returns the residual value f.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 a = ab(1); b = abs(ab(2));
 f1 = PLO - normcdf(XLO, a, b);
 f2 = PUP - normcdf(XUP, a, b);
diff --git a/MatlabFiles/nqzdiv.m b/MatlabFiles/nqzdiv.m
index e1d505f0cdb0ff6ff25a7c8b049d651023316205..4c3f6699f68bb6658e19fe5c959d4bf5a8c2086e 100644
--- a/MatlabFiles/nqzdiv.m
+++ b/MatlabFiles/nqzdiv.m
@@ -7,6 +7,23 @@ function [A,B,P,R] = nqzdiv(stake,A,B,V,P)
 % Note: the input A and B are U.T.; the output A and B are diagonal.
 %
 % Modified by T.Zha, 5/26/97
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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);
 
diff --git a/MatlabFiles/numgrad.m b/MatlabFiles/numgrad.m
index 1a037988bd230f3e4fecae576516bc9eaa9aff6b..89eb38e36e6a4055982ce2ab7b86c056d7829dca 100644
--- a/MatlabFiles/numgrad.m
+++ b/MatlabFiles/numgrad.m
@@ -14,6 +14,22 @@ function [grdd, badg] = numgrad(fcn,x0,varargin)
 %   grdd: n-by-k Jacobian matrix (gradients).
 %
 % Written by Tao Zha, 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 stps = eps^(1/3);
diff --git a/MatlabFiles/numgradcd.m b/MatlabFiles/numgradcd.m
index b922e97450231593476969233c7cfdd676563516..bf09580387ed4bea42a868046ef2a39239ecab02 100644
--- a/MatlabFiles/numgradcd.m
+++ b/MatlabFiles/numgradcd.m
@@ -14,6 +14,22 @@ function [grdd, badg] = numgradcd(fcn,x0,varargin)
 %   grdd: n-by-k Jacobian matrix (gradients).
 %
 % Written by Tao Zha, 2002.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 stps = eps^(1/3);
diff --git a/MatlabFiles/numgradorig.m b/MatlabFiles/numgradorig.m
index 36fb0b11940ed89e4c5e4e326e4c53ebc41d71af..9cf92a02ef6fd9cc0843df96e603aaf701760f1d 100644
--- a/MatlabFiles/numgradorig.m
+++ b/MatlabFiles/numgradorig.m
@@ -1,5 +1,22 @@
 function [g, badg] = numgrad(fcn,x,varargin)
 % function [g badg] = numgrad(fcn,xvarargin)
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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;  % works for a general case
 %delta = 1e-2;  % bigger step -- works for a flat peak
diff --git a/MatlabFiles/ols.m b/MatlabFiles/ols.m
index a265d587ae27b423a1fed044bcf08db7a412479e..e4fcb29fa030da961cb04d16707f08209cd71b54 100644
--- a/MatlabFiles/ols.m
+++ b/MatlabFiles/ols.m
@@ -10,6 +10,22 @@ function [Bh,e,xtx,xty] = ols(y,phi)
 %          y:    Y: T-by-nvar
 %
 %          See also sye.m and syed.m
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup of orders and lengths **
 [u d v]=svd(phi,0); %trial
diff --git a/MatlabFiles/pdfforg.m b/MatlabFiles/pdfforg.m
index 6efa24976eb9f0fe06a8a079a03479883686df87..c41c494ecc5d48fa2fb974ab30a6a066cd8d3a45 100644
--- a/MatlabFiles/pdfforg.m
+++ b/MatlabFiles/pdfforg.m
@@ -18,6 +18,22 @@ function [imfpdf,imfpo,imfprob] = pdfforg(imfcnt,imndraws,forep,nvar,ninv,invc,A
 %
 % 27 August 1998 Tao Zha
 % Revised, October 1998
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 invlength = invc ./ ninv;
 invlengthM = repmat(invlength,[2+ninv,1]);
diff --git a/MatlabFiles/perr1graph.m b/MatlabFiles/perr1graph.m
index 6333e15681736d7487def4c16ca8279f1025ec27..4efeb2b5c25dab8f0ffaf8d57aa13c73edd54de6 100644
--- a/MatlabFiles/perr1graph.m
+++ b/MatlabFiles/perr1graph.m
@@ -21,6 +21,23 @@ function scaleout = perr1graph(imf,firstl1,firsth1,...
 %     xlab,ylab:   labels
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 t = 1:nstp;
 nrow
 ncol
diff --git a/MatlabFiles/perr2graph.m b/MatlabFiles/perr2graph.m
index 140e1f98c402bc55fa37612c0d14a71f5391dbb8..ba33cd00a566223f13c368aa1eb2d8efde67a097 100644
--- a/MatlabFiles/perr2graph.m
+++ b/MatlabFiles/perr2graph.m
@@ -15,6 +15,22 @@ function scaleout = perr2graph(imf,firstl1,firsth1,...
 %   xlab,ylab:   labels
 %
 %  See imrgraph, imcerrgraph, imrerrgraph
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 t = 1:nstp;
diff --git a/MatlabFiles/phg233.m b/MatlabFiles/phg233.m
index 106c6e2a877b7f9d22c6a40f097664da034f0bd0..0e23d5b646b8804bf2f8bd7b2ce7e673b403adce 100644
--- a/MatlabFiles/phg233.m
+++ b/MatlabFiles/phg233.m
@@ -18,6 +18,24 @@ function g = phg233(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revisions by CAS 9/27/96:  If we transmit idmat, rather than a0indx, we can scale the elements of
 % idmat so that it carries information about relative prior variances.
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
+%
+% 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/phg234.m b/MatlabFiles/phg234.m
index b524aa950c93ab2d149cc63d05c222e95f73505c..36e6f9c79493fb8953426a74d45901755182bb1d 100644
--- a/MatlabFiles/phg234.m
+++ b/MatlabFiles/phg234.m
@@ -21,7 +21,23 @@ function g = phg234(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/12/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/phg235.m b/MatlabFiles/phg235.m
index 5ea7616876dc5c11142b844fb8dbab38953c0c67..936ebfd90920a420fc221f5e8fbbfa37ef13b32c 100644
--- a/MatlabFiles/phg235.m
+++ b/MatlabFiles/phg235.m
@@ -21,7 +21,23 @@ function g = phg235(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/13/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaha0 vaMMa0 GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pmddf233.m b/MatlabFiles/pmddf233.m
index c8a79fd8d27d8df651ef73abc6a39689b387581f..67ce8a1287a90425d4584fc35bd5cee615d3ac59 100644
--- a/MatlabFiles/pmddf233.m
+++ b/MatlabFiles/pmddf233.m
@@ -18,6 +18,24 @@ function of = pmddf233(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revisions by CAS 9/27/96:  If we transmit idmat, rather than a0indx, we can scale the elements of
 % idmat so that it carries information about relative prior variances.
+
+% Copyright (C) 1997-2012 Christopher A. 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pmddf234.m b/MatlabFiles/pmddf234.m
index 0a560d126afb08db5ae9bde5ecf449f16a60a550..6bad4ee13c7646e30f84ea8f6566cda8a1e3bdcd 100644
--- a/MatlabFiles/pmddf234.m
+++ b/MatlabFiles/pmddf234.m
@@ -21,7 +21,23 @@ function of = pmddf234(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/12/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pmddf235.m b/MatlabFiles/pmddf235.m
index 87c1130bc3b6b35adac41273f352d999853531b4..ca4d78235f8d470488890b21a629fe7e6aa3c35d 100644
--- a/MatlabFiles/pmddf235.m
+++ b/MatlabFiles/pmddf235.m
@@ -21,7 +21,23 @@ function of = pmddf235(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/13/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaha0 vaMMa0 GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pmddf236.m b/MatlabFiles/pmddf236.m
index c67f111f5ae177a1f733e076b4e92456ab4aa0d0..a8d33d0c07af530d0acdd59794a76731bddbc029 100644
--- a/MatlabFiles/pmddf236.m
+++ b/MatlabFiles/pmddf236.m
@@ -21,7 +21,23 @@ function of = pmddf236(x,idmat0,idmatp,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/13/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaha0 vaMMa0 GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pmddg233.m b/MatlabFiles/pmddg233.m
index 2c58c0ecb1c07355b80c94077163b39d79131f8a..0091ed6f04af459b34af668eac42f20663742403 100644
--- a/MatlabFiles/pmddg233.m
+++ b/MatlabFiles/pmddg233.m
@@ -11,7 +11,23 @@ function [g,badg] = pmddg233(x,idmat0,idmat1,fss,nvar, ...
 % sg0bid (diagonal of Sigma0_bar on the parameters in i-th equation in A0,
 % initial prior covariace matrix), sgpbid (diagonal of Sigma+_bar on the
 % parameters in i-th equation in A0, initial prior covariance matrix).
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga FRESHFUNCTION
 % CAS added FRESHFUNCTION 8/20/96 to allow use of pmddg23 in a numerical Hessian calculation, where
 % it is invoked repeatedly without new function evaluations.
diff --git a/MatlabFiles/pmddg234.m b/MatlabFiles/pmddg234.m
index 578c46eb6858ae99153d4c50915d78b257e5548e..4b4e95aad8089ab0fa3ea0d944fe3f30fbe01b27 100644
--- a/MatlabFiles/pmddg234.m
+++ b/MatlabFiles/pmddg234.m
@@ -11,7 +11,23 @@ function [g,badg] = pmddg234(x,idmat0,idmat1,fss,nvar, ...
 % sg0bid (diagonal of Sigma0_bar on the parameters in i-th equation in A0,
 % initial prior covariace matrix), sgpbid (diagonal of Sigma+_bar on the
 % parameters in i-th equation in A0, initial prior covariance matrix).
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga FRESHFUNCTION
 % CAS added FRESHFUNCTION 8/20/96 to allow use of pmddg23 in a numerical Hessian calculation, where
 % it is invoked repeatedly without new function evaluations.
diff --git a/MatlabFiles/pmddg235.m b/MatlabFiles/pmddg235.m
index 332669d84411dc3b7c79e22b576544ae4821f86c..187999952fe8ac0d05e05f891db8e96af5d85604 100644
--- a/MatlabFiles/pmddg235.m
+++ b/MatlabFiles/pmddg235.m
@@ -11,7 +11,23 @@ function [g,badg] = pmddg235(x,idmat0,idmat1,fss,nvar, ...
 % sg0bid (diagonal of Sigma0_bar on the parameters in i-th equation in A0,
 % initial prior covariace matrix), sgpbid (diagonal of Sigma+_bar on the
 % parameters in i-th equation in A0, initial prior covariance matrix).
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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 vaha0 vaMMa0 FRESHFUNCTION
 % CAS added FRESHFUNCTION 8/20/96 to allow use of pmddg23 in a numerical Hessian calculation, where
 % it is invoked repeatedly without new function evaluations.
diff --git a/MatlabFiles/pmddg236.m b/MatlabFiles/pmddg236.m
index a1361c72221a98efafa871b570cb5d66aa59b688..bb7596b024dae92a161d744a91b2a1dbadac0059 100644
--- a/MatlabFiles/pmddg236.m
+++ b/MatlabFiles/pmddg236.m
@@ -12,7 +12,23 @@ function [g,badg] = pmddg236(x,idmat0,idmatp,fss,nvar, ...
 % sg0bid (diagonal of Sigma0_bar on the parameters in i-th equation in A0,
 % initial prior covariace matrix), sgpbid (diagonal of Sigma+_bar on the
 % parameters in i-th equation in A0, initial prior covariance matrix).
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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 vaha0 vaMMa0 FRESHFUNCTION
 % CAS added FRESHFUNCTION 8/20/96 to allow use of pmddg23 in a numerical Hessian calculation, where
 % it is invoked repeatedly without new function evaluations.
diff --git a/MatlabFiles/pmddwf23.m b/MatlabFiles/pmddwf23.m
index afc294a76d5dce5174be3f5548f5162eaf95cb0a..dcf99fcc8fdf730ad7ec9a6f6c36bbf65ecd0bf6 100644
--- a/MatlabFiles/pmddwf23.m
+++ b/MatlabFiles/pmddwf23.m
@@ -17,7 +17,23 @@ function [of,GlbAphh] = pmddwf23(x,a0indx,fss,nvar,ncoef,phi, ...
 % A0b (initial prior mean on A0)
 % sg0bid (diagonal of Sigma0_bar, unweighted prior vcv on the parameters in i-th equation in A0)
 % sgpbid (diagonal of Sigma+_bar, unweighted prior vcv on the parameters in i-th equation in A+)
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga GlbAph
 % pre-allocate GlbAph to be zeros(nvar,lags*nvar+1=ncoef)
 
diff --git a/MatlabFiles/probvalsec.m b/MatlabFiles/probvalsec.m
index 242a239e7c5e264217a08908a2b278fbca0b980c..aabcd4eb08bc1f5b14931b6494790c7a489a8a80 100644
--- a/MatlabFiles/probvalsec.m
+++ b/MatlabFiles/probvalsec.m
@@ -30,6 +30,23 @@ function [probelow,valow,yhatmean] = probvalsec(yhatprob,yhatpo,ninv,forep,nvar,
 % yhatmean: forep-by-nvar.  The mean of forecasts of Pcm, M2, FFR, etc.
 %
 % 3/25/99 Tao A. Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 yhatprob2=reshape(yhatprob,2+ninv,forep,nvar);
 yhatpo2=reshape(yhatpo,2+ninv,forep,nvar);
diff --git a/MatlabFiles/pwf233.m b/MatlabFiles/pwf233.m
index ee1ea7e7ffe0a7366b0564462e9d4fd266af85b2..c3096cdca0fabd660143c0e1d73ce8a49ea997e0 100644
--- a/MatlabFiles/pwf233.m
+++ b/MatlabFiles/pwf233.m
@@ -18,6 +18,24 @@ function of = pwf233(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revisions by CAS 9/27/96:  If we transmit idmat, rather than a0indx, we can scale the elements of
 % idmat so that it carries information about relative prior variances.
+% Copyright (C) 1997-2012 Christopher A. 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pwf234.m b/MatlabFiles/pwf234.m
index 76826855d443f7d6d984950c1766ba05ebaaeb0b..8ccd987057661c6c58a77aeb6c166e85c1e7f1ca 100644
--- a/MatlabFiles/pwf234.m
+++ b/MatlabFiles/pwf234.m
@@ -21,7 +21,23 @@ function of = pwf234(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/12/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaya0 vaha0 vaxah vahad vbiga GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/pwf235.m b/MatlabFiles/pwf235.m
index bddfea2d0107fcd3a4b122be689e534cd8d1c528..2a6188b8be0c30b6e0edd745abd45777c39019a8 100644
--- a/MatlabFiles/pwf235.m
+++ b/MatlabFiles/pwf235.m
@@ -21,7 +21,23 @@ function [of,GlbAphh] = pwf235(x,idmat0,idmat1,fss,nvar,ncoef,phi, ...
 %
 % Revsions by TZ, 10/13/96:  efficiency improvement by streamlining the previous code
 %     according to the general setup in Sims and Zha "Bayesian Methods for ...".
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
 %
+% 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 vaha0 vaMMa0 GlbAph FRESHFUNCTION
 % FRESHFUNCTION added 8/20/90 by CAS.  It signals the pmddg23 whether the global variables
 % it uses have been refreshed by a new pmddf231 call since the last gradient call.
diff --git a/MatlabFiles/qplot2.m b/MatlabFiles/qplot2.m
index a6e033f4f416207c6db6083b7f1bf4052446304a..5152157cf05424c09e370d6e0716164b20f1b048 100644
--- a/MatlabFiles/qplot2.m
+++ b/MatlabFiles/qplot2.m
@@ -18,6 +18,24 @@ function dummyout = qplot2(datavector,inityear,initquart,quarter_label)
 % Original: June 18, 1997
 % Last Modified: July 23, 1997
 
+% Copyright (C) 1997-2012 Clark A. Burdick
+%
+% 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/>.
+
+
 % TO BE DONE:
 % 1. Add better bullet proofing
 % 2. Cleaning and streamlining
diff --git a/MatlabFiles/qzdiv.m b/MatlabFiles/qzdiv.m
index 9ab80a68467fce806a77265c62843764571ead06..2713198a0ee431551066af9d550fd04cd3206b55 100644
--- a/MatlabFiles/qzdiv.m
+++ b/MatlabFiles/qzdiv.m
@@ -8,6 +8,23 @@ function [A,B,Q,Z,v] = qzdiv(stake,A,B,Q,Z,v)
 %
 % by Christopher A. Sims
 % modified (to add v to input and output) 7/27/00
+% Copyright (C) 1997-2012 Christopher A. 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/>.
+
 vin = nargin==6;
 if ~vin
    v=[];
diff --git a/MatlabFiles/qzdivct.m b/MatlabFiles/qzdivct.m
index 289062c3140bed33e0922d49dfb45424bf8deede..128ae219e68f8627cfd373eedfe5349eaf1c763e 100644
--- a/MatlabFiles/qzdivct.m
+++ b/MatlabFiles/qzdivct.m
@@ -12,7 +12,23 @@ function [A,B,Q,Z] = qzdivct(stake,A,B,Q,Z)
 % qzdiv in that it works on the real part's value, as is appropriate for
 % continuous time models, instead of on the absolute value, as is
 % appropriate for discrete time models.
+% Copyright (C) 1997-2012 Tao Zha
 %
+% 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;
 [n jnk] = size(A);
diff --git a/MatlabFiles/qzswitch.m b/MatlabFiles/qzswitch.m
index 93c36640cc3488a66dc6c5261b8778e45c314c94..ad86b0e021e38a8ab95f88bfccad3c6f607f2cad 100644
--- a/MatlabFiles/qzswitch.m
+++ b/MatlabFiles/qzswitch.m
@@ -9,6 +9,23 @@ 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.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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);
diff --git a/MatlabFiles/reset_ini_seed.m b/MatlabFiles/reset_ini_seed.m
index 522d0127a910ee594ade2723c74824f213ebfccf..4285e91c76284f96b1982bddafa2277fd5c1510f 100644
--- a/MatlabFiles/reset_ini_seed.m
+++ b/MatlabFiles/reset_ini_seed.m
@@ -1,6 +1,22 @@
 function reset_ini_seed(seednumber)
 %After Matlab starts, run this function to reset the seed number; otherwise, Matlab automatically resets to the same initial seed.
 % seednumber:  0 -- random state reset to the clock time;
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 seednumber
    randn('state',seednumber);
diff --git a/MatlabFiles/rlrpostr.m b/MatlabFiles/rlrpostr.m
index 5bd1462bcbc7ee1eda8197d995cbe168fa223bed..abdfabf55d4476d2aab8c48a0d7b645ec256d94d 100644
--- a/MatlabFiles/rlrpostr.m
+++ b/MatlabFiles/rlrpostr.m
@@ -29,6 +29,22 @@ function [P,H0inv,Hpinv] = rlrpostr(xtx,xty,yty,Ptld,H0invtld,Hpinvtld,Ui,Vi)
 % Hpinv: cell(nvar,1).  In each cell, posterior inv(Hp) for the ith equation.
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 nvar = size(yty,1);
 
diff --git a/MatlabFiles/rlrprior.m b/MatlabFiles/rlrprior.m
index f5cd6f8e2650b4df5c6528dc22747d2580f17928..5d9156194b8c9016bca09abaae921dfc65021cb9 100644
--- a/MatlabFiles/rlrprior.m
+++ b/MatlabFiles/rlrprior.m
@@ -26,6 +26,22 @@ function [Ptld,H0invtld,Hpinvtld] = rlrprior(Ui,Vi,Pi,H0multi,Hpmulti,nvar)
 % Hpinvtld: cell(nvar,1), transformed inv covaraince for free parameters in A+(:,i);
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 Ptld = cell(nvar,1); % tld: tilda
 H0invtld = cell(nvar,1);  % H0 for different equations under linear restrictions
diff --git a/MatlabFiles/rnrprior.m b/MatlabFiles/rnrprior.m
index 4a1f93e1033b1c664c903106d48a95494e722974..76ee6ea69fbae58ecb39a07d879d672e6755a10c 100644
--- a/MatlabFiles/rnrprior.m
+++ b/MatlabFiles/rnrprior.m
@@ -35,6 +35,22 @@ function [Pi,H0multi,Hpmulti,H0invmulti,Hpinvmulti,asym0,asymp] ...
 % asymp:  ncoef-1-by-nvar asymmetric prior on A+ bar constant.  Column -- equation
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 nargin==5, nexo=1; end
diff --git a/MatlabFiles/run.m b/MatlabFiles/run.m
index b8976b4ccdf4ad8e2570963cc4faf61ab4987ca7..c1e7a1e684afdbcb0ed6043ddfcdd7c9891dc375 100644
--- a/MatlabFiles/run.m
+++ b/MatlabFiles/run.m
@@ -1,3 +1,20 @@
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 intervalcl
 clear all
 clsort
\ No newline at end of file
diff --git a/MatlabFiles/sbcontest.m b/MatlabFiles/sbcontest.m
index 4fe57f01a5c15383fed563b7f33a1d6e97c90957..1fa6c64b2622f0377d482ef5c487577d612614c4 100644
--- a/MatlabFiles/sbcontest.m
+++ b/MatlabFiles/sbcontest.m
@@ -11,6 +11,22 @@ function [pabove,pbelow]=sbcontest(xinput)
 %--------------
 % pabove:  probablity of the reduced-form LH value above the overidentified LH peak value
 % pbelow:  probablity of the reduced-form LH value below the overidentified LH peak value
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 idenmlh = xinput{1}; SpHUouth = xinput{2}; fss = xinput{3}; imndraws = xinput{4}; nvar = xinput{5};
 nbuffer = xinput{6};
diff --git a/MatlabFiles/simtanzphi.m b/MatlabFiles/simtanzphi.m
index 90e970504cb6d30b461533c0d8c65cc6e75de549..f9ae33086ad6c8bb2bb2cc2f9eeed1a37d368b22 100644
--- a/MatlabFiles/simtanzphi.m
+++ b/MatlabFiles/simtanzphi.m
@@ -14,6 +14,22 @@ function simtanzphi(X,k,nvar,U);
 %           the degree of simultaneity
 %
 % Copyright (c) 1999 by D.F. Waggoner and T.A. Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 ZPHI
 
diff --git a/MatlabFiles/smtplis.m b/MatlabFiles/smtplis.m
index caf1d8e0bf3ffa4cd05e68f0f1acc1de03eb75c6..e609f33e2f3fe000ad55bd5adbb24d3bf5804622 100644
--- a/MatlabFiles/smtplis.m
+++ b/MatlabFiles/smtplis.m
@@ -21,6 +21,22 @@ function [Avhx,hAvhx,cJump] = smtplis(Avhx,hAvhx,tdf,cJump,scf,...
 %
 % December 1998 by Tao Zha
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %** draw free elements Avh in A0 and hyperparameters from t-dist
 Avhz1 = scf*H_sr*randn(nfp,1);     % normal draws
diff --git a/MatlabFiles/smtplis2.m b/MatlabFiles/smtplis2.m
index 5a601ef9eb40bd6bebbfdb038acbf50e9cb62042..83fb0add90a10f068c22d1ca7ff9b88b93e546ac 100644
--- a/MatlabFiles/smtplis2.m
+++ b/MatlabFiles/smtplis2.m
@@ -28,6 +28,22 @@ function [Avhx,AvhxD,hAvhx,hAvhxD,cJump,hAvhh] = smtplis2(Avhx,AvhxD,hAvhx,hAvhx
 % hAvhh: highest point of lh
 %
 % November 1998 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 ~(fix(tdf)-tdf==0)
 	warning('tdf in msstart.m must be integer for drawing chi^2 from normal')
diff --git a/MatlabFiles/smtplis2seq.m b/MatlabFiles/smtplis2seq.m
index 36a91f70de8bd917e3ab86e4bec8c979bef84bf6..a66258c43a5c4a90ff2cb9465f7aef37d1399438 100644
--- a/MatlabFiles/smtplis2seq.m
+++ b/MatlabFiles/smtplis2seq.m
@@ -28,6 +28,22 @@ function [Avhx,AvhxD,hAvhx,hAvhxD,cJump,hAvhh] = smtplis2seq(Avhx,AvhxD,hAvhx,hA
 % hAvhh: highest point of lh
 %
 % November 1998 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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 ~(fix(tdf)-tdf==0)
 	warning('tdf in msstart.m must be integer for drawing chi^2 from normal')
diff --git a/MatlabFiles/srestrictrwzalg.m b/MatlabFiles/srestrictrwzalg.m
index e0aae5c0e49bd4d2312275110910c410c58123c2..cdf1bdc6126f1ea112a033d9b8da1256ee006e83 100644
--- a/MatlabFiles/srestrictrwzalg.m
+++ b/MatlabFiles/srestrictrwzalg.m
@@ -25,6 +25,22 @@ function Q = SRestrictRWZalg(A0hatinv,Bhat,nvar,lags,irs)
 %    Shocks are in the following order: 1: AS; 2: AD; 3: MP; 4: MD; 5: Exec.
 %
 % Copyright (c) Rubio, Waggoner, and Zha, 2005.
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 nn = [nvar lags irs];
diff --git a/MatlabFiles/startd.m b/MatlabFiles/startd.m
index 71dfe3b09d4c5c25cd2da194a194aa0073343d6d..c9a373bdd1b738a43d0b3124347a60fc93d72467 100644
--- a/MatlabFiles/startd.m
+++ b/MatlabFiles/startd.m
@@ -4,4 +4,21 @@ function startd(sd)
 % use this function.  E.g.
 %        sd=cd  %to set sd to the current directory
 %        startd(sd)
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 save '/Users/tzha/ZhaData/Git/TZcode/MatlabFiles/startdir0' sd
diff --git a/MatlabFiles/startup.m b/MatlabFiles/startup.m
index f7aeaa43f77fee77329443ac144eda0c8097238d..05332cf3dc7865f938f6ff831eb6986a8be7f8cd 100644
--- a/MatlabFiles/startup.m
+++ b/MatlabFiles/startup.m
@@ -2,6 +2,22 @@ function startup()
 % Remembers a previously set startup directory to set the directory, invoke startd.  E.g.,
 %  sd=cd % Set sd to the current directory
 %  startd(sd)
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 %----------------------------------
 
diff --git a/MatlabFiles/subtitle.m b/MatlabFiles/subtitle.m
index cc77fe79e2c96976f189159e04ee63589c27bbc4..ec184e9e2a5a3049c5c0eb51c977607695e60f18 100644
--- a/MatlabFiles/subtitle.m
+++ b/MatlabFiles/subtitle.m
@@ -6,6 +6,23 @@
       %           returns handles to both the axis and the title.
       % ax=subtitle(text)
       %           returns a handle to the axis only.
+      % Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 %      ax=axes('Units','Normal','Position',[.05 .05 .9 .9],'Visible','off','FontSize',14,'FontWeight','Bold');
       ax=axes('Units','Normal','Position',[.05 .05 .9 .9],'Visible','off','FontSize',10,'FontWeight','Bold','FontName','Times New Roman');
diff --git a/MatlabFiles/suptitle.m b/MatlabFiles/suptitle.m
index fdcd6fb3e68f2deb70616059fecc3dc938f97941..a8f90f4d5550a964a46753bf06223f5ca25d8d48 100644
--- a/MatlabFiles/suptitle.m
+++ b/MatlabFiles/suptitle.m
@@ -5,6 +5,23 @@ function hout=suptitle(str)
 %	after all subplot commands.
 
 % Drea Thomas 6/15/95 drea@mathworks.com
+% Copyright (C) 1997-2012 Drea Thomas
+%
+% 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/>.
+
 
 % Warning: If the figure or axis units are non-default, this
 % will break.
diff --git a/MatlabFiles/sye.m b/MatlabFiles/sye.m
index 498ac9b9f7dcd5850eabee093f47a07fc72c8851..d85235145f2e07966116d125c0cfa2ba1c9ade90 100644
--- a/MatlabFiles/sye.m
+++ b/MatlabFiles/sye.m
@@ -29,6 +29,22 @@ function [Bh,e,xtx,xty,phi,y,ncoe,xr] = sye(z,lags)
 % Revised, 5/2/99.  Replaced outputs Sigu and xtxinv with xr so that previous
 %                programs may be incompatible.
 
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup of orders and lengths **
 [sp,nvar] = size(z);   % sp: sample period T include lags
diff --git a/MatlabFiles/syed.m b/MatlabFiles/syed.m
index dc6c2766418150f2cdcedd07be32996db8de825f..e9df9cee59076a1665824f467733ec4616094285 100644
--- a/MatlabFiles/syed.m
+++ b/MatlabFiles/syed.m
@@ -15,6 +15,22 @@ function [Bh,e,xtx,phi,y] = syed(z,nn)
 %          y:    Y
 %
 %          See also "sye.m".
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 % ** setup of orders and lengths **
 auindx = nn(1);
diff --git a/MatlabFiles/szasbvar.m b/MatlabFiles/szasbvar.m
index db55b9cef5eeff5a6b115b6049b856c1c6d63248..a2b13463a67d28efb351f040ae0347d113d56b7e 100644
--- a/MatlabFiles/szasbvar.m
+++ b/MatlabFiles/szasbvar.m
@@ -67,6 +67,22 @@ function [Gb,Sbd,Bh,SpH,fss,ndobs,phi,y,nvar,ncoef,xxhpc,a0indx,na0p,...
 %    not be compatible with old programs, 03/06/99 by TZ
 %  NOTE3:  added three output arguments: H0invmulti and Hpinvmulti and xxhp.  9/27/99
 
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
+%
+% 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/>.
 
 
 %
diff --git a/MatlabFiles/szbvar.m b/MatlabFiles/szbvar.m
index 5a0063263fbbe27401ef335f3ed45abcb6384dc7..46344b45ff754b9ed08f158a0f370e07f88e21cf 100644
--- a/MatlabFiles/szbvar.m
+++ b/MatlabFiles/szbvar.m
@@ -32,6 +32,22 @@ function [A0hin,Hm1t,fss,ndobs,phi,y,nvar,ncoef,SpH,SpHsc,xxhpc,a0indx,na0p,...
 % Copyright (c) July 1997 by C.A. Sims and T. Zha
 %
 % Quick Revisions: May 2003.  See H1p_1 on lines 301-304.
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
+%
+% 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/>.
 
 %
 %@@@ Prepared for Bayesian VAR of Sims and Zha
diff --git a/MatlabFiles/tran_a2b.m b/MatlabFiles/tran_a2b.m
index 8158d13a2ac9adbf6be1bda033411b256e7919cb..7abce26e1cec2690853d973a2e13aa473fb41b7a 100644
--- a/MatlabFiles/tran_a2b.m
+++ b/MatlabFiles/tran_a2b.m
@@ -16,6 +16,22 @@ function b = tran_a2b(A0,Ui,nvar,n0)
 % b: sum(n0)-by-1 vector of A0 free parameters
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 n0cum = cumsum(n0);
diff --git a/MatlabFiles/tran_b2a.m b/MatlabFiles/tran_b2a.m
index 2c20b974176c49fbeb5765b9567bbead60f60277..22b13961048a0172461d5e75c8c26b0b7debd206 100644
--- a/MatlabFiles/tran_b2a.m
+++ b/MatlabFiles/tran_b2a.m
@@ -16,6 +16,22 @@ function A0 = tran_b2a(b,Ui,nvar,n0)
 % A0: nvar-by-nvar, contempareous matrix (columns correspond to equations)
 %
 % Tao Zha, February 2000
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 b=b(:);
 A0 = zeros(nvar);
diff --git a/MatlabFiles/xydata.m b/MatlabFiles/xydata.m
index 4ba08e40327be2def159012e88b91555a17617fb..59bb08118b3d9c61238e105519a8eb8d6aef194c 100644
--- a/MatlabFiles/xydata.m
+++ b/MatlabFiles/xydata.m
@@ -84,6 +84,22 @@ function [phi,y,fss,xtx,xty,yty,Bols] = xydata(xdgel,lags,mu)
 %
 %  NOTE2: I put "mu" as an input arg and delete "nhp" as an input arg, so it may
 %    not be compatible with old programs, 03/06/99 by TAZ
+% Copyright (C) 1997-2012 Christopher A. Sims and Tao Zha 
+%
+% 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/>.
 
 
 [nSample,nvar]=size(xdgel);   % sample size including lags and number of variables
diff --git a/MatlabFiles/zimpulse.m b/MatlabFiles/zimpulse.m
index a15847419ebfee3bcdfc9b3d9d2d90548f141dfc..70db3814dffd6270ea72cea7d2791708fe1b5ce5 100644
--- a/MatlabFiles/zimpulse.m
+++ b/MatlabFiles/zimpulse.m
@@ -13,6 +13,23 @@ function imf = zimpulse(Bh,swish,nn)
 %  Written by Tao Zha
 %
 % Copyright (c) 1994 by Tao Zha
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
+
 
 nvar = nn(1);
 lags = nn(2);
diff --git a/MatlabFiles/zroot.m b/MatlabFiles/zroot.m
index f72125d48f17a83f4d28124cb0ad0a20be59734d..033590ba213d609b52941e4870ba0d0f4d9a3fd1 100644
--- a/MatlabFiles/zroot.m
+++ b/MatlabFiles/zroot.m
@@ -18,6 +18,22 @@ function zstar = zroot(B)
 
 % TO BE DONE:
 % Better bullet proofing
+% Copyright (C) 1997-2012 Tao Zha
+%
+% 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/>.
 
 
 [a b c] = size(B);