diff --git a/matlab/AIM/dynAIMsolver1.m b/matlab/AIM/dynAIMsolver1.m
index acc1e12e31193ce63e376773427f5215b1cd5184..e6970dadaa7a552c44d33263b1f7f6309299b64a 100644
--- a/matlab/AIM/dynAIMsolver1.m
+++ b/matlab/AIM/dynAIMsolver1.m
@@ -43,8 +43,24 @@ function [dr,aimcode,rts]=dynAIMsolver1(jacobia_,M_,dr)
 %       i.e. diff < e-14 for aa and diff < *e-13 for jacobia_ if Q' is used.  
 %
 % GP July 2008 
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
+
 aimcode=-1;
 neq= size(jacobia_,1); % no of equations
 lags=M_.maximum_endo_lag; % no of lags and leads
diff --git a/matlab/DiffuseKalmanSmoother3.m b/matlab/DiffuseKalmanSmoother3.m
index b41768e3bb5b9bb0b3244670d1da55f776d3033e..91c6e6a95be6d6e253139911fef92e46b4e53f4d 100644
--- a/matlab/DiffuseKalmanSmoother3.m
+++ b/matlab/DiffuseKalmanSmoother3.m
@@ -1,5 +1,4 @@
 function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
-
 % function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
 % Computes the diffuse kalman smoother without measurement error, in the case of a singular var-cov matrix.
 % Univariate treatment of multivariate time series.
@@ -22,15 +21,28 @@ function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,
 %    etahat:   smoothed shocks
 %    a1:        matrix of one step ahead filtered state variables
 %    aK:       3D array of k step ahead filtered state variables
-
+%
 % SPECIAL REQUIREMENTS
 %   See "Filtering and Smoothing of State Vector for Diffuse State Space
 %   Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series 
 %   Analysis, vol. 24(1), pp. 85-98). 
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
 % Modified by M. Ratto
 % New output argument aK: 1-step to nk-stpe ahed predictions)
diff --git a/matlab/DiffuseKalmanSmoother3_Z.m b/matlab/DiffuseKalmanSmoother3_Z.m
index 42f2246728fb698f767ca7c0b63157ffe397c492..01e8abf8b43a5eb2c96237a794dd1ab35b5e559c 100644
--- a/matlab/DiffuseKalmanSmoother3_Z.m
+++ b/matlab/DiffuseKalmanSmoother3_Z.m
@@ -1,5 +1,4 @@
 function [alphahat,etahat,a1,P,aK,PK,d,decomp] = DiffuseKalmanSmoother3_Z(T,Z,R,Q,Pinf1,Pstar1,Y,pp,mm,smpl)
-
 % function [alphahat,etahat,a1,P,aK,PK,d,decomp_filt] = DiffuseKalmanSmoother3(T,Z,R,Q,Pinf1,Pstar1,Y,pp,mm,smpl)
 % Computes the diffuse kalman smoother without measurement error, in the case of a singular var-cov matrix.
 % Univariate treatment of multivariate time series.
@@ -34,10 +33,23 @@ function [alphahat,etahat,a1,P,aK,PK,d,decomp] = DiffuseKalmanSmoother3_Z(T,Z,R,
 %   See "Filtering and Smoothing of State Vector for Diffuse State Space
 %   Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series 
 %   Analysis, vol. 24(1), pp. 85-98). 
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
 % Modified by M. Ratto
 % New output argument aK: 1-step to nk-stpe ahed predictions)
diff --git a/matlab/DiffuseKalmanSmootherH1.m b/matlab/DiffuseKalmanSmootherH1.m
index aed1a82c73af9cb93a36230655fa9ca157535981..2150c22d9ffaae1fc767d3972a2f8784e607dc2f 100644
--- a/matlab/DiffuseKalmanSmootherH1.m
+++ b/matlab/DiffuseKalmanSmootherH1.m
@@ -1,5 +1,4 @@
 function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
-
 % function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
 % Computes the diffuse kalman smoother with measurement error, in the case of a non-singular var-cov matrix 
 %
@@ -22,15 +21,28 @@ function [alphahat,epsilonhat,etahat,a, aK] = DiffuseKalmanSmootherH1(T,R,Q,H,Pi
 %    etahat:    smoothed shocks
 %    a:         matrix of one step ahead filtered state variables
 %    aK:        3D array of k step ahead filtered state variables
-
+%
 % SPECIAL REQUIREMENTS
 %   See "Filtering and Smoothing of State Vector for Diffuse State Space
 %   Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series 
 %   Analysis, vol. 24(1), pp. 85-98). 
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
 % modified by M. Ratto:
 % new output argument aK (1-step to k-step predictions)
diff --git a/matlab/DiffuseKalmanSmootherH3.m b/matlab/DiffuseKalmanSmootherH3.m
index 172d15a0e69871b515e32f09645bfa1ffa7acf0c..7a69f56fb3095514cb0fd3aee043452bc826fc1c 100644
--- a/matlab/DiffuseKalmanSmootherH3.m
+++ b/matlab/DiffuseKalmanSmootherH3.m
@@ -1,5 +1,4 @@
 function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
-
 % function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf)
 % Computes the diffuse kalman smoother with measurement error, in the case of a singular var-cov matrix.
 % Univariate treatment of multivariate time series.
@@ -23,15 +22,28 @@ function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,P
 %    etahat:    smoothed shocks
 %    a1:        matrix of one step ahead filtered state variables
 %    aK:        3D array of k step ahead filtered state variables
-
+%
 % SPECIAL REQUIREMENTS
 %   See "Filtering and Smoothing of State Vector for Diffuse State Space
 %   Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series 
 %   Analysis, vol. 24(1), pp. 85-98). 
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
 % Modified by M. Ratto
 % New output argument aK: 1-step to nk-stpe ahed predictions)
@@ -45,7 +57,6 @@ function [alphahat,epsilonhat,etahat,a1, aK] = DiffuseKalmanSmootherH3(T,R,Q,H,P
 % some bugs corrected in the DKF part of the smoother (Z matrix and
 % alphahat)
 
-
 global options_
 
 nk = options_.nk;
diff --git a/matlab/DiffuseKalmanSmootherH3corr.m b/matlab/DiffuseKalmanSmootherH3corr.m
index b3e92e96372a9117fd91e4aebee9cef018fc81b4..fb7b060cc06b932e06809418d089337a029572a8 100644
--- a/matlab/DiffuseKalmanSmootherH3corr.m
+++ b/matlab/DiffuseKalmanSmootherH3corr.m
@@ -27,9 +27,23 @@ function [alphahat,epsilonhat,etahat,a1] = DiffuseKalmanSmootherH3corr(T,R,Q,H,P
 %   See "Fast Filtering and Smoothing for Multivariate State Space
 %   Models", S.J. Koopman and J. Durbin (2000, in Journal of Time Series 
 %   Analysis, vol. 21(3), pp. 281-296).  
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
+
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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 options_;
 
diff --git a/matlab/DsgeLikelihood.m b/matlab/DsgeLikelihood.m
index b3e4808c9e4c4c107f34e095c24700c64b860891..47dd3c31355044b633ab548627fffd5d22952e96 100644
--- a/matlab/DsgeLikelihood.m
+++ b/matlab/DsgeLikelihood.m
@@ -18,9 +18,24 @@ function [fval,cost_flag,ys,trend_coeff,info] = DsgeLikelihood(xparam1,gend,data
 %               
 % SPECIAL REQUIREMENTS
 %   Adapted from mj_optmumlik.m
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
+
+% Copyright (C) 2004-2008 Dynare Team
+%
+% This file is part of Dynare.
+%
+% Dynare is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
+
   global bayestopt_ estim_params_ options_ trend_coeff_ M_ oo_ xparam1_test
   fval		= [];
   ys		= [];
diff --git a/matlab/DsgeSmoother.m b/matlab/DsgeSmoother.m
index e6594a641b633dbcc4f9a4493e66f27fb95b5d61..158b75ec8b7673522621e2d5fbca9eca91e5ad1e 100644
--- a/matlab/DsgeSmoother.m
+++ b/matlab/DsgeSmoother.m
@@ -27,9 +27,23 @@ function [alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK,T,R,P,PK,d,
 %
 % SPECIAL REQUIREMENTS
 %   None
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% This file is part of Dynare.
+%
+% Dynare is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
   global bayestopt_ M_ oo_ estim_params_ options_
 
diff --git a/matlab/GetPosteriorParametersStatistics.m b/matlab/GetPosteriorParametersStatistics.m
index a1301609720f2786b4a1d8968e90ffb3e4d543c7..3ce58e1d60f98f880c8baf0d08e1d0feb1af88ac 100644
--- a/matlab/GetPosteriorParametersStatistics.m
+++ b/matlab/GetPosteriorParametersStatistics.m
@@ -10,9 +10,23 @@ function get_posterior_parameters_statistics()
 %
 % SPECIAL REQUIREMENTS
 %   None.
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 estim_params_ M_ options_ bayestopt_ oo_
 
diff --git a/matlab/McMCDiagnostics.m b/matlab/McMCDiagnostics.m
index 2e34f6bd7021a1ac27f24dd87b26f4a8dad8f285..aa3d56a5cbe6bf72d40f42422446b23055979279 100644
--- a/matlab/McMCDiagnostics.m
+++ b/matlab/McMCDiagnostics.m
@@ -1,5 +1,4 @@
 function McMCDiagnostics
-
 % function McMCDiagnostics
 % Computes convergence tests 
 % 
@@ -11,10 +10,23 @@ function McMCDiagnostics
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2005-2008)
-% Gnu Public License.
 
+% Copyright (C) 2005-2008 Dynare Team
+%
+% 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 options_ estim_params_ M_ 
 
diff --git a/matlab/bksup1.m b/matlab/bksup1.m
index a7516916cc4420babcd85787d10963e27ee4ea3d..61fc00da77f6a7f054454f190dbd1dc216a90979 100644
--- a/matlab/bksup1.m
+++ b/matlab/bksup1.m
@@ -1,5 +1,4 @@
 function d = bksup1(ny,jcf)
-
 % function d = bksup1(ny,jcf)
 % Solves deterministic models recursively by backsubstitution for one lead/lag
 %
@@ -12,10 +11,23 @@ function d = bksup1(ny,jcf)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2007)
-% Gnu Public License.
 
+% Copyright (C) 2003-2007 Dynare Team
+%
+% 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 options_ iyf c 
 
diff --git a/matlab/bksupk.m b/matlab/bksupk.m
index fd838dc8226f89230a7c4a9b5393c3e693ee1b96..bc13cb4f68ef994017b4b2cdc30c70cdd2680f55 100644
--- a/matlab/bksupk.m
+++ b/matlab/bksupk.m
@@ -14,9 +14,23 @@ function d1 = bksupk(ny,fid,jcf,icc1)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2007)
-% Gnu Public License.
+
+% Copyright (C) 2003-2007 Dynare Team
+%
+% 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 M_ options_
 
diff --git a/matlab/bvar_density.m b/matlab/bvar_density.m
index 92e898cb47f98d7aedc4b8bae464e03ec2dc084d..245b72b8f64ca30fd56902c55adbf97272a88a7d 100644
--- a/matlab/bvar_density.m
+++ b/matlab/bvar_density.m
@@ -1,5 +1,4 @@
 function bvar_density(maxnlags)
-
 % function bvar_density(maxnlags)
 % computes the density of a bayesian var
 %
@@ -11,9 +10,24 @@ function bvar_density(maxnlags)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2007)
-% Gnu Public License.
+
+% Copyright (C) 2003-2007 Chris Sims
+% Copyright (C) 2007 Dynare Team
+%
+% 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 nlags = 1:maxnlags
         [ny, nx, posterior, prior] = bvar_toolbox(nlags);
diff --git a/matlab/bvar_forecast.m b/matlab/bvar_forecast.m
index 29e5d2ab598c7cadf502d51f9260f1c3292d6a24..b2c655e440c6376ab95a9a1a266ba3f7dbcaac81 100644
--- a/matlab/bvar_forecast.m
+++ b/matlab/bvar_forecast.m
@@ -1,5 +1,4 @@
 function bvar_forecast(nlags)
-
 % function bvar_forecast(nlags)
 % builds forecats for a bvar model
 %
@@ -11,9 +10,23 @@ function bvar_forecast(nlags)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2007-2008 Dynare Team
+%
+% 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 options_ oo_ M_
     
diff --git a/matlab/bvar_toolbox.m b/matlab/bvar_toolbox.m
index 3271edcee5731fe56b549446c344325b709e3720..17d203ca7526536931be0191c8fb544b629ff84c 100644
--- a/matlab/bvar_toolbox.m
+++ b/matlab/bvar_toolbox.m
@@ -1,5 +1,4 @@
 function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
-
 %function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
 % bvar_toolbox  Routines shared between BVAR methods
 % Computes several things for the estimations of a BVAR(nlags)
@@ -41,10 +40,25 @@ function [ny, nx, posterior, prior, forecast_data] = bvar_toolbox(nlags)
 %    This function uses the following Dynare options:
 %    - datafile, first_obs, varobs, xls_sheet, xls_range, nobs, presample
 %    - bvar_prior_{tau,decay,lambda,mu,omega,flat,train}
-%    
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
     
+% Copyright (C) 2003-2007 Chris Sims
+% Copyright (C) 2007-2008 Dynare Team
+%
+% 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 options_
     
     % Load dataset
diff --git a/matlab/check_posterior_analysis_data.m b/matlab/check_posterior_analysis_data.m
index b774a13d6ff9e3dbe297bdca66064715bd377728..d474bdaf779e5fe2269d02051bb213a5e1be6304 100644
--- a/matlab/check_posterior_analysis_data.m
+++ b/matlab/check_posterior_analysis_data.m
@@ -1,6 +1,21 @@
 function [info,description] = check_posterior_analysis_data(type,M_)
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
     
     info = 0;
     if nargout>1
diff --git a/matlab/compute_mh_covariance_matrix.m b/matlab/compute_mh_covariance_matrix.m
index c7e7425f534d39fc4097213be2041b8097813069..bb458c872bdb567928a13bb9d30575dbfb5599b4 100644
--- a/matlab/compute_mh_covariance_matrix.m
+++ b/matlab/compute_mh_covariance_matrix.m
@@ -13,9 +13,23 @@ function [m0,s0] = compute_mh_covariance_matrix()
 %
 % SPECIAL REQUIREMENTS
 %   None.
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 M_ options_ estim_params_
 
diff --git a/matlab/dr1.m b/matlab/dr1.m
index 03eae53ecbe7ce7bf2c1d69eb6a9555ba731c548..ddb770735652961e8e9d33eb39ed70c23e96a93b 100644
--- a/matlab/dr1.m
+++ b/matlab/dr1.m
@@ -29,9 +29,23 @@ function [dr,info,M_,options_,oo_] = dr1(dr,task,M_,options_,oo_)
 % SPECIAL REQUIREMENTS
 %   none.
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+
+% Copyright (C) 1996-2008 Dynare Team
+%
+% 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/>.
 
     info = 0;
   
diff --git a/matlab/draw_prior_density.m b/matlab/draw_prior_density.m
index 4fac2a1f300650832c38aadaca715e7524e7f4bf..02eeedf8dcd41e19f68a3f7caa809014ee272087 100644
--- a/matlab/draw_prior_density.m
+++ b/matlab/draw_prior_density.m
@@ -1,5 +1,4 @@
 function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
-
 % function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx)
 % plots prior density
 %
@@ -16,10 +15,23 @@ function [x,f,abscissa,dens,binf,bsup] = draw_prior_density(indx);
 %    
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% This file is part of Dynare.
+%
+% Dynare is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 global bayestopt_
 
diff --git a/matlab/dsample.m b/matlab/dsample.m
index 986a560ee6b9cfb6373cf29ec51aa655e4dbcbf6..8d24b7cc8aa4284c1105f73191113a25bf34ca54 100644
--- a/matlab/dsample.m
+++ b/matlab/dsample.m
@@ -1,5 +1,4 @@
 function dsample(s1,s2)
-		
 % function dsample(s1,s2)
 % This optional command permits to reduce the number of periods considered in following output commands.
 % If only one argument is provided, output is from period 1 to the period specified in the DSAMPLE command. 
@@ -15,10 +14,23 @@ function dsample(s1,s2)
 %    
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
 
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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 options_
 
diff --git a/matlab/dsge_posterior_theoretical_correlation.m b/matlab/dsge_posterior_theoretical_correlation.m
index 690ab0814c068598d881ddd4faf0833af0c3a768..3a1d55c05418b5c0d6261e7440581b644996b146 100644
--- a/matlab/dsge_posterior_theoretical_correlation.m
+++ b/matlab/dsge_posterior_theoretical_correlation.m
@@ -1,4 +1,5 @@
 function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(SampleSize,nar,M_,options_,oo_)
+%function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(SampleSize,nar,M_,options_,oo_)
 % This function estimates the posterior density of the endogenous
 % variables second order moments. 
 % 
@@ -18,10 +19,23 @@ function [nvar,vartan,CorrFileNumber] = dsge_posterior_theoretical_correlation(S
 %                                                   resol.m
 %                                                   th_autocovariances.m    
 %                                                   posterior_moments.m
-%    
-%  
-% part of DYNARE, copyright Dynare Team (2007-2008)
-% Gnu Public License.
+
+% Copyright (C) 2007-2008 Dynare Team
+%
+% 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/>.
 
 type = 'posterior';
     
diff --git a/matlab/dsge_posterior_theoretical_covariance.m b/matlab/dsge_posterior_theoretical_covariance.m
index 4b32d3a09f3c955c3c9313e0376691cee2bfaf67..3b238cf8db7c5879eccfacd755f93ea0742f9831 100644
--- a/matlab/dsge_posterior_theoretical_covariance.m
+++ b/matlab/dsge_posterior_theoretical_covariance.m
@@ -18,10 +18,23 @@ function [nvar,vartan,CovarFileNumber] = dsge_posterior_theoretical_covariance(S
 %                                                   resol.m
 %                                                   th_autocovariances.m    
 %                                                   posterior_moments.m
-%    
-%  
-% part of DYNARE, copyright Dynare Team (2007-2008)
-% Gnu Public License.
+
+% Copyright (C) 2007-2008 Dynare Team
+%
+% 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/>.
 
 type = 'posterior';
     
diff --git a/matlab/dsgevar_posterior_density.m b/matlab/dsgevar_posterior_density.m
index c488a32f60c87c65e8c3cf7a59a31d5a15589d19..73ec1e0b28fc97040912d0c96f297562bd5dbf28 100644
--- a/matlab/dsgevar_posterior_density.m
+++ b/matlab/dsgevar_posterior_density.m
@@ -15,9 +15,24 @@ function bvar = dsgevar_posterior_density(deep)
 % SPECIAL REQUIREMENTS
 %   none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 options_ M_
 
 gend = options_.nobs;
diff --git a/matlab/dyn2vec.m b/matlab/dyn2vec.m
index 84118cc99f6c3e766ecb39c36b3984c8b14e34ad..7a3ee987eb0c9c3169b9fe706d768299c4d98ab6 100644
--- a/matlab/dyn2vec.m
+++ b/matlab/dyn2vec.m
@@ -1,4 +1,5 @@
-% function [z,zss]=dyn2vec(s1,s2);
+function [z,zss]=dyn2vec(s1,s2)
+% function [z,zss]=dyn2vec(s1,s2)
 % Takes Dynare variables from oo_.endo_simul and copies them into matlab global vectors
 %
 % INPUTS
@@ -12,12 +13,23 @@
 % SPECIAL REQUIREMENTS
 %   none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
-
 
-function [z,zss]=dyn2vec(s1,s2);
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_ options_
 
diff --git a/matlab/dynare.m b/matlab/dynare.m
index c5f1d5c5124faa905abf989777ab6730686e33ab..4fa9e086b27cf967c0988ff4ecdb1248264b13ea 100644
--- a/matlab/dynare.m
+++ b/matlab/dynare.m
@@ -15,9 +15,23 @@ function dynare(fname, varargin)
 %        
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
+
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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_config
 
diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m
index 941f7be9212ae612a4d844334a88f0dcd9a7aafa..6b7d9a3db4385f78ef7cdc40381906b860ef6b98 100644
--- a/matlab/dynare_config.m
+++ b/matlab/dynare_config.m
@@ -1,9 +1,9 @@
 function dynareroot = dynare_config(path_to_dynare)
+%function dynareroot = dynare_config(path_to_dynare)
 % This function tests the existence of valid mex files (for qz
 % decomposition, solution to sylvester equation and kronecker
 % products...) and, if needed, add paths to the matlab versions
 % of these routines.
-% 
 %
 % INPUTS
 %   none
@@ -13,9 +13,24 @@ function dynareroot = dynare_config(path_to_dynare)
 %        
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
+
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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
     addpath(path_to_dynare);
 end
diff --git a/matlab/dynare_solve.m b/matlab/dynare_solve.m
index 23382c6b2fdbb26ab30f2f152fa409a6e8381cf7..c376a4f1aa5fe8e51f6470d266980169f7850ada 100644
--- a/matlab/dynare_solve.m
+++ b/matlab/dynare_solve.m
@@ -1,5 +1,4 @@
 function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
-
 % function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
 % proposes different solvers
 %
@@ -16,10 +15,23 @@ function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
 
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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 options_
   
diff --git a/matlab/dynasave.m b/matlab/dynasave.m
index bfac0b9960883be460decffb31f873180653c656..2531a13ec26c5f075175aa0f0536f6c21384f7cf 100644
--- a/matlab/dynasave.m
+++ b/matlab/dynasave.m
@@ -14,10 +14,23 @@ function dynasave(s,var_list)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_
 
diff --git a/matlab/dynatype.m b/matlab/dynatype.m
index 3ed73583b7705a45ed677dd40c491406f9bf0927..fe606dbf50b1776006e3a037828a573e99ed9e79 100644
--- a/matlab/dynatype.m
+++ b/matlab/dynatype.m
@@ -1,5 +1,4 @@
 function dynatype (s,var_list)
-
 % function dynatype (s,var_list)
 % This optional command saves the simulation results in a text file. The name of each 
 % variable preceeds the corresponding results. This command must follow SIMUL.
@@ -14,10 +13,23 @@ function dynatype (s,var_list)
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_
 
diff --git a/matlab/ff1_.m b/matlab/ff1_.m
index 2a645ccf08624a91e7958ef9ade5da4575ebbbc1..4b6b666cef9c959abfabcc796e81eb9b68449274 100644
--- a/matlab/ff1_.m
+++ b/matlab/ff1_.m
@@ -11,9 +11,23 @@ function y=ff1_(x)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
+
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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 it_ M_ oo_
 
diff --git a/matlab/ffill.m b/matlab/ffill.m
index 40edae2e06092911d26ef602101e6e10ebcef455..646f2f2576666a92493fdad287014b17d9d1f0ad 100644
--- a/matlab/ffill.m
+++ b/matlab/ffill.m
@@ -1,7 +1,6 @@
 function [a,b] = ffill(x,ixc,y)
-
 % function [a,b] = ffill(x,ixc,y)
-% Makes the horizontale concatenation if x exists
+% Makes the horizontal concatenation if x exists
 % and fills the matrix with 0 if x and y are not the same size.
 %
 % INPUTS
@@ -15,10 +14,23 @@ function [a,b] = ffill(x,ixc,y)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
 
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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/>.
 
 xc = size(x,1) ;
 
diff --git a/matlab/forcst.m b/matlab/forcst.m
index 986f60989080be08284dd0f6bfa95e1d2867a4ee..bfdb6126df3361410c2f3c71d14b5ac1a5bfa91a 100644
--- a/matlab/forcst.m
+++ b/matlab/forcst.m
@@ -17,9 +17,23 @@ function [yf,int_width]=forcst(dr,y0,horizon,var_list)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 M_  oo_ options_ 
     
diff --git a/matlab/gensylv/gensylv.m b/matlab/gensylv/gensylv.m
index f60ce903d4469d0ef10e9a985e32b91769d0134e..5ccacb271d235442906b4e9d1ee3da54c0838540 100644
--- a/matlab/gensylv/gensylv.m
+++ b/matlab/gensylv/gensylv.m
@@ -1,4 +1,5 @@
 function E = gensylv(fake,A,B,C,D)
+%function E = gensylv(fake,A,B,C,D)
 % Solves a Sylvester equation.
 %
 % INPUTS
@@ -15,11 +16,25 @@ function E = gensylv(fake,A,B,C,D)
 %   none.
 %
 % SPECIAL REQUIREMENTS
-%   none.
-%  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+%   none.  
+
+% Copyright (C) 1996-2008 Dynare Team
+%
+% 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/>.
+
 C  = kron(C,C); 
 x0 = sylvester3(A,B,C,D);
-E  = sylvester3a(x0,A,B,C,D);
\ No newline at end of file
+E  = sylvester3a(x0,A,B,C,D);
diff --git a/matlab/get_date_of_a_file.m b/matlab/get_date_of_a_file.m
index 30cf5de331fb661c409372c1145bea927c27665a..a3155e0f688621e7c6865290d6c8ecfe78e8a560 100644
--- a/matlab/get_date_of_a_file.m
+++ b/matlab/get_date_of_a_file.m
@@ -1,8 +1,25 @@
 function [d1,d2] = get_date_of_a_file(filename)
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+%function [d1,d2] = get_date_of_a_file(filename)
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
+
     info = dir(filename);
     d1 = info.datenum;
     if nargout>1
         d2 = info.date;
-    end
\ No newline at end of file
+    end
diff --git a/matlab/get_innovation_contemporaneous_impact.m b/matlab/get_innovation_contemporaneous_impact.m
index 8e8f188d93bbeeea53c51aeb77bd9891a8c73123..9cb5442b67e84cd9a4e696ab810f473e12941de6 100644
--- a/matlab/get_innovation_contemporaneous_impact.m
+++ b/matlab/get_innovation_contemporaneous_impact.m
@@ -23,9 +23,23 @@ function B = get_innovation_contemporaneous_impact(type,info)
 %
 % SPECIAL REQUIREMENTS
 %   This function needs to be run after the estimation of a model.
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 oo_ M_ bayestopt_ options_
 
diff --git a/matlab/get_name_of_the_last_mh_file.m b/matlab/get_name_of_the_last_mh_file.m
index f3508b33b6e827da22aa41209a9e9704a99199b7..95cee5bc0645ed5d350cbe917eff61ab12e2a48c 100644
--- a/matlab/get_name_of_the_last_mh_file.m
+++ b/matlab/get_name_of_the_last_mh_file.m
@@ -1,6 +1,23 @@
 function mhname = get_name_of_the_last_mh_file(M_)
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+%function mhname = get_name_of_the_last_mh_file(M_)
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
+
     model_name = M_.fname ;
     mcmc_directory = M_.dname ;
     load([ mcmc_directory '/metropolis/' model_name '_mh_history.mat']) ;
diff --git a/matlab/get_the_name.m b/matlab/get_the_name.m
index 2cfe7b6a974839dc1a46eac71fa1e417e0448b2f..e625d1bd4b4faee156a565f39c51a1facacfb6ab 100644
--- a/matlab/get_the_name.m
+++ b/matlab/get_the_name.m
@@ -14,9 +14,23 @@ function [nam,texnam] = get_the_name(k,TeX)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
+
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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 M_ estim_params_ options_
 
diff --git a/matlab/global_initialization.m b/matlab/global_initialization.m
index 1ffc014d428ddb742d428c7893a34bef92aa1dbb..2206e2e8c7e95856d2e3b08816dbbf7d17ea7ecf 100644
--- a/matlab/global_initialization.m
+++ b/matlab/global_initialization.m
@@ -1,4 +1,5 @@
 function global_initialization()
+%function global_initialization()
 % initializes global variables and options for DYNARE
 %
 % INPUTS
@@ -9,9 +10,24 @@ function global_initialization()
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 oo_ M_ options_ ct_ endval_ rplottype_
 
   ct_=0;
diff --git a/matlab/homotopy2.m b/matlab/homotopy2.m
index 106a62256bc35fea74a787ea24fae26bea2afaef..e970bf3c86f88a1d99ad054d0e63a05b4836590d 100644
--- a/matlab/homotopy2.m
+++ b/matlab/homotopy2.m
@@ -24,9 +24,23 @@ function homotopy2(values, step_nbr)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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 M_ oo_ options_
 
diff --git a/matlab/indnv.m b/matlab/indnv.m
index df4b18a670619775275827b73bbba19dfcb90d1d..be3dbd0ca15f9de8b7d8ccc900bc3e659036b195 100644
--- a/matlab/indnv.m
+++ b/matlab/indnv.m
@@ -12,9 +12,23 @@ function a=indnv(x,y)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
+
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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(size(x)) ;
 
diff --git a/matlab/initial_estimation_checks.m b/matlab/initial_estimation_checks.m
index d3b9af8109fae2d35c2925a0216759bd1d6c504a..8e4c6cb92627a5778af85aba2a9d5101fdf43a03 100644
--- a/matlab/initial_estimation_checks.m
+++ b/matlab/initial_estimation_checks.m
@@ -13,10 +13,23 @@ function initial_estimation_checks(xparam1,gend,data)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
 
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 dr1_test bayestopt_ estim_params_ options_ oo_ M_
 
diff --git a/matlab/initvalf.m b/matlab/initvalf.m
index f7e28ce95705045eace280993143aed07a3f70d9..3a70aa4396b212836df9bca9422cbc8680889448 100644
--- a/matlab/initvalf.m
+++ b/matlab/initvalf.m
@@ -13,9 +13,23 @@ function initvalf(fname)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2007)
-% Gnu Public License.
+
+% Copyright (C) 2003-2007 Dynare Team
+%
+% 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 M_ oo_ options_
   global y_start_date ex_start_date 
diff --git a/matlab/inverse_gamma_specification.m b/matlab/inverse_gamma_specification.m
index 7b10b0405fb7defb2c9c8898b4e38a4c5dc4658b..f2b8585955f849c1b6617e1472d195dcc4d9f31f 100644
--- a/matlab/inverse_gamma_specification.m
+++ b/matlab/inverse_gamma_specification.m
@@ -16,9 +16,23 @@ function [s,nu] = inverse_gamma_specification(mu,sigma,type)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
 sigma2 = sigma^2;
 mu2 = mu^2;
diff --git a/matlab/irf.m b/matlab/irf.m
index ebefdaa9e195865bebdc45533831933e3b893a6c..717c74806cee1fdc8a7eb2ad165faf6a9c2525a8 100644
--- a/matlab/irf.m
+++ b/matlab/irf.m
@@ -16,9 +16,23 @@ function y = irf(dr, e1, long, drop, replic, iorder)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 M_ oo_ options_
 
diff --git a/matlab/ispd.m b/matlab/ispd.m
index a2c785e549411162c91ffd151bded6f2796c0f38..99cc181be2c886ff09d963c4d0115fac5e4bfa25 100644
--- a/matlab/ispd.m
+++ b/matlab/ispd.m
@@ -11,9 +11,23 @@ function test = ispd(A)
 %
 % SPECIAL REQUIREMENTS
 %   None.
-%  
-% part of DYNARE, copyright Dynare Team (2007-2008)
-% Gnu Public License.
+
+% Copyright (C) 2007-2008 Dynare Team
+%
+% 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 = length(A);% I do not test for a square matrix...
 test = 1;
diff --git a/matlab/kalman_transition_matrix.m b/matlab/kalman_transition_matrix.m
index b43512f80f17d00efc00489ad981ca488664f383..e1cc9ad48bf2482e4526d207313d12277f90edd5 100644
--- a/matlab/kalman_transition_matrix.m
+++ b/matlab/kalman_transition_matrix.m
@@ -14,9 +14,23 @@ function [A,B] = kalman_transition_matrix(dr,iv,ic,aux,exo_nbr)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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_iv = length(iv);
   n_ir1 = size(aux,1);
diff --git a/matlab/kernel_density_estimate.m b/matlab/kernel_density_estimate.m
index 7320faf28fa37dca0495a9a9bddb847cb7679a0a..172097c870c7bb0acd8614ef717b4f0537758b67 100644
--- a/matlab/kernel_density_estimate.m
+++ b/matlab/kernel_density_estimate.m
@@ -23,8 +23,23 @@ function [abscissa,f] = kernel_density_estimate(data,number_of_grid_points,numbe
 %    A kernel density estimator is used (see Silverman [1986], "Density estimation for statistics and data analysis")
 %    The code is adapted from Anders Holtsberg's matlab toolbox (stixbox). 
 %
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
+
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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 min(size(data))>1
     error('kernel_density_estimate:: data must be a one dimensional array.');
diff --git a/matlab/kronecker/A_times_B_kronecker_C.m b/matlab/kronecker/A_times_B_kronecker_C.m
index 8374deef44017525782ef3cc5a1fa6f9b06b5c19..a0a863937dd59c379813afb03d918523f6a7a370 100644
--- a/matlab/kronecker/A_times_B_kronecker_C.m
+++ b/matlab/kronecker/A_times_B_kronecker_C.m
@@ -1,4 +1,5 @@
 function D = A_times_B_kronecker_C(A,B,C)
+%function D = A_times_B_kronecker_C(A,B,C)
 % Computes A * kron(B,C). 
 %
 % INPUTS
@@ -14,10 +15,23 @@ function D = A_times_B_kronecker_C(A,B,C)
 %
 % SPECIAL REQUIREMENTS
 %   none.
-%  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+
+% Copyright (C) 1996-2008 Dynare Team
+%
+% 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/>.
     
 % Chek number of inputs and outputs.
 if nargin>3 | nargin<2
diff --git a/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m b/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
index 76c3b4b00a03cb5f47f6ab5b59041d9f9e9ffaa9..12c00209f830176f470ba08baa9c1d2829fa280d 100644
--- a/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
+++ b/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
@@ -1,4 +1,5 @@
 function D = sparse_hessian_times_B_kronecker_C(A,B,C)
+%function D = sparse_hessian_times_B_kronecker_C(A,B,C)
 % Computes A * kron(B,C) where A is a sparse matrix.
 %
 % INPUTS
@@ -14,10 +15,24 @@ function D = sparse_hessian_times_B_kronecker_C(A,B,C)
 %
 % SPECIAL REQUIREMENTS
 %   none.
-%  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+
+% Copyright (C) 1996-2008 Dynare Team
+%
+% 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/>.
+
 switch nargin
   case 3
     D = A_times_B_kronecker_C(A,B,C);
@@ -25,4 +40,4 @@ switch nargin
     D = A_times_B_kronecker_C(A,B,B);
   otherwise
     error('Two or Three input arguments required!')
-end
\ No newline at end of file
+end
diff --git a/matlab/lnsrch1.m b/matlab/lnsrch1.m
index db8181be91f27150a4f6a674b51d957bd8ec8f2c..592da48deb93f88d0921e8d0d39e58dd2e8884da 100644
--- a/matlab/lnsrch1.m
+++ b/matlab/lnsrch1.m
@@ -1,4 +1,5 @@
-% function [x,f,fvec,check]=lnsrch(xold,fold,g,p,stpmax,func,j1,j2,varargin)
+function [x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin)
+% function [x,f,fvec,check]=lnsrch1(xold,fold,g,p,stpmax,func,j1,j2,varargin)
 % Computes the optimal step by minimizing the residual sum of squares
 %
 % INPUTS
@@ -21,13 +22,24 @@
 % 
 % SPECIAL REQUIREMENTS
 %   none
-%  
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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/>.
 
-function [x,f,fvec,check]=lnsrch(xold,fold,g,p,stpmax,func,j1,j2,varargin)
   global options_
   
   alf = 1e-4 ;
diff --git a/matlab/lpdfgam.m b/matlab/lpdfgam.m
index 704c1ff92f44d5acc0f55c8a7a8764fb442afaed..c3a4e778ae275dcd262eb09f1db1d685aa9dd763 100644
--- a/matlab/lpdfgam.m
+++ b/matlab/lpdfgam.m
@@ -13,9 +13,23 @@ function  ldens = lpdfgam(x,a,b);
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
   ldens = -gammaln(a) -a*log(b)+ (a-1)*log(x) -x/b ;
 
diff --git a/matlab/lpdfgbeta.m b/matlab/lpdfgbeta.m
index d0c6936598954518c27e97fc852a9e246a073c69..7623bc44ee0df066d7eb81a57cd944bc1243ffc4 100644
--- a/matlab/lpdfgbeta.m
+++ b/matlab/lpdfgbeta.m
@@ -15,9 +15,23 @@ function ldens = lpdfgbeta(x,a,b,aa,bb);
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
 ldens = -betaln(a,b) + (a-1)*log(x-aa) + (b-1)*log(bb-x) - (a+b-1)*log(bb-aa);
 
diff --git a/matlab/lpdfig1.m b/matlab/lpdfig1.m
index 1e77d416d9ef1a2acac61a80c2208a4d02bfabec..cf5446448a4d9afe86aaba9a86f83d85417eadd5 100644
--- a/matlab/lpdfig1.m
+++ b/matlab/lpdfig1.m
@@ -1,5 +1,4 @@
 function ldens = lpdfig1(x,s,nu)
-
 % function ldens = lpdfig1(x,s,nu)
 % log INVERSE GAMMA (type 1) 
 % X ~ IG1(s,nu)
@@ -9,16 +8,29 @@ function ldens = lpdfig1(x,s,nu)
 %    x:      density evatuated at x
 %    s:      shape parameter 
 %    nu:     scale parameter 
-
+%
 % OUTPUTS
 %    ldens:  the log INVERSE GAMMA density function (type 1)
 %        
 % SPECIAL REQUIREMENTS
 % See L. Bauwens, M. Lubrano and J-F. Richard [1999, appendix A] for more
 % details.
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
-ldens = log(2) - gammaln(nu/2) - (nu/2).*log(2/s) - (nu+1)*log(x) - .5*s./(x.^2);
\ No newline at end of file
+ldens = log(2) - gammaln(nu/2) - (nu/2).*log(2/s) - (nu+1)*log(x) - .5*s./(x.^2);
diff --git a/matlab/lpdfig2.m b/matlab/lpdfig2.m
index a8f472caa6c2d8ac13d0c6d8986bb5cb39ef981e..1cc398204e902416984cc2abfed983e21e88c44d 100644
--- a/matlab/lpdfig2.m
+++ b/matlab/lpdfig2.m
@@ -1,5 +1,4 @@
 function ldens = lpdfig2(x,s,nu)
-
 % function ldens = lpdfig2(x,s,nu)
 % log INVERSE GAMMA (type 2) 
 % X ~ IG2(s,nu)
@@ -9,16 +8,29 @@ function ldens = lpdfig2(x,s,nu)
 %    x:      density evatuated at x
 %    s:      shape parameter 
 %    nu:     scale parameter 
-
+%
 % OUTPUTS
 %    ldens:  the log INVERSE GAMMA density function (type 2)
 %        
 % SPECIAL REQUIREMENTS
 % See L. Bauwens, M. Lubrano and J-F. Richard [1999, appendix A] for more
 % details.
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
 
-ldens = - gammaln(nu/2) - (nu/2)*log(2/s) - .5*(nu+2)*log(x) -.5*s./x;
\ No newline at end of file
+ldens = - gammaln(nu/2) - (nu/2)*log(2/s) - .5*(nu+2)*log(x) -.5*s./x;
diff --git a/matlab/lpdfnorm.m b/matlab/lpdfnorm.m
index b7afde00fadd12f87eedb688bb7a0915f9b2d710..0279bb3998b42a794888d227641bda4738a98217 100644
--- a/matlab/lpdfnorm.m
+++ b/matlab/lpdfnorm.m
@@ -1,5 +1,4 @@
 function  f = lpdfnorm(x,m,s)
-
 % function f = lpdfnorm(x,m,s)
 % The log of the normal density function 
 %
@@ -7,16 +6,29 @@ function  f = lpdfnorm(x,m,s)
 %    x:      density evatuated at x
 %    m:      mean 
 %    s:      standard deviation 
-
+%
 % OUTPUTS
 %    f:      the log of the normal density function
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
 
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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, s=1; end
 if nargin<2, m=0; end
diff --git a/matlab/make_ex_.m b/matlab/make_ex_.m
index 3943f4f36d035a96b959db1c8103960cd48a278d..b722a095f9e8a6ea6b624ff5bbecd24efaf662ec 100644
--- a/matlab/make_ex_.m
+++ b/matlab/make_ex_.m
@@ -11,9 +11,23 @@ function make_ex_
 % SPECIAL REQUIREMENTS
 %   none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 M_ options_ oo_ ex0_ ex_det0_
   
diff --git a/matlab/make_y_.m b/matlab/make_y_.m
index a2e20c18305ec48d0503826ac7658af2bd3e7f06..72cfd6bda7d590a6eec26942b8244c9edbb77d53 100644
--- a/matlab/make_y_.m
+++ b/matlab/make_y_.m
@@ -11,9 +11,24 @@ function make_y_
 % SPECIAL REQUIREMENTS
 %   none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 M_ options_ oo_ ys0_ 
   
   options_ = set_default_option(options_,'periods',0);
diff --git a/matlab/marginal_density.m b/matlab/marginal_density.m
index 32a86974e6d5891773fe12dac94f3194dea7ca78..97a4364ed597c96bd456033b8430c8e642281da2 100644
--- a/matlab/marginal_density.m
+++ b/matlab/marginal_density.m
@@ -1,5 +1,4 @@
 function marginal = marginal_density()
-
 % function marginal = marginal_density()
 % Computes the marginal density
 %
@@ -11,10 +10,23 @@ function marginal = marginal_density()
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2005-2007)
-% Gnu Public License.
 
+% Copyright (C) 2005-2007 Dynare Team
+%
+% 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 M_ options_ estim_params_ oo_
 
diff --git a/matlab/matlab_ver_less_than.m b/matlab/matlab_ver_less_than.m
index 4b83843f8949abece673944baad22a5d04a5cc9b..499ebb3aaab923105179feeae5ceea3d27cded15 100644
--- a/matlab/matlab_ver_less_than.m
+++ b/matlab/matlab_ver_less_than.m
@@ -17,9 +17,23 @@ function r = matlab_ver_less_than(verstr)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
 
   ver_struct = ver('matlab');
   cur_verstr = ver_struct.Version;
diff --git a/matlab/metropolis_hastings_initialization.m b/matlab/metropolis_hastings_initialization.m
index a3570b0e34ecfa14f8a7f914ee89d12b2fe78ae7..1af16a4b58c34fe4d630ebc2d4c337b367aae95c 100644
--- a/matlab/metropolis_hastings_initialization.m
+++ b/matlab/metropolis_hastings_initialization.m
@@ -15,9 +15,24 @@ function [ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck,
 %
 % SPECIAL REQUIREMENTS
 %   None.
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 M_ options_ bayestopt_
 
 ModelName = M_.fname;
diff --git a/matlab/mh_optimal_bandwidth.m b/matlab/mh_optimal_bandwidth.m
index 884898a4d47bdbf04dff7fe779882b23150b2c0a..958d358b36bfd24f3327e20c9d7887007c4512c5 100644
--- a/matlab/mh_optimal_bandwidth.m
+++ b/matlab/mh_optimal_bandwidth.m
@@ -23,11 +23,24 @@ function optimal_bandwidth = mh_optimal_bandwidth(data,number_of_draws,bandwidth
 % REFERENCES:
 %   [1] M. Skold and G.O. Roberts [2003], "Density estimation for the Metropolis-Hastings algorithm". 
 %   [2] Silverman [1986], "Density estimation for statistics and data analysis". 
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
-  
 
+% Copyright (C) 2004-2008 Dynare Team
+%
+% 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/>.
+  
 %% Kernel specifications.
 if strcmpi(kernel_function,'gaussian')
     % Kernel definition
diff --git a/matlab/mode_check.m b/matlab/mode_check.m
index b4b4ac9ac77ef1b2782cd7d9773797d991ccc9bd..fc2ded65234094c760f4620194d7af9e87521fcd 100644
--- a/matlab/mode_check.m
+++ b/matlab/mode_check.m
@@ -17,9 +17,23 @@ function mode_check(x,fval,hessian,gend,data,lb,ub)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% This file is part of Dynare.
+%
+% Dynare is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 global bayestopt_ M_ options_
 
diff --git a/matlab/my_subplot.m b/matlab/my_subplot.m
index 41963ebd69333ab4b1925a186b46a3c9e85359b0..2f1e3c5495a19e24979c10bd4889a8d701c337d5 100644
--- a/matlab/my_subplot.m
+++ b/matlab/my_subplot.m
@@ -16,9 +16,23 @@ function my_subplot(i,imax,irow,icol,fig_title)
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
   nfig_max = irow*icol;
   if imax < nfig_max
diff --git a/matlab/numgrad3.m b/matlab/numgrad3.m
index e370539f0ce88bbd427983df37851e542c70fd83..e1203536ea0c0a9e8eced39c1248f5e1ba02cd82 100644
--- a/matlab/numgrad3.m
+++ b/matlab/numgrad3.m
@@ -6,9 +6,23 @@ function [g, badg, f0, f1, f2] = numgrad3(fcn,x,varargin)
 %
 % See section 25.3.4 in Abramovitz and Stegun (1972, Tenth Printing, December) Handbook of Mathematical Functions.
 % http://www.math.sfu.ca/~cbm/aands/ 
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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.
 %
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 f0 = NaN;
 f1 = NaN;
diff --git a/matlab/numgrad5.m b/matlab/numgrad5.m
index fde4a30a6a31332ee1bd5233987bfc536918fb18..8ff0ef3bae32b9fb2b5c899722205249a00ddd3d 100644
--- a/matlab/numgrad5.m
+++ b/matlab/numgrad5.m
@@ -9,8 +9,23 @@ function [g, badg, f0, f1, f2, f3, f4] = numgrad5(fcn,x,varargin)
 %
 % TODO Try Four points formula when cost_flag3=0 or cost_flag4=0.
 %
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
 
 f0 = NaN;
 f1 = NaN;
diff --git a/matlab/octave_ver_less_than.m b/matlab/octave_ver_less_than.m
index 25105c489f3d3e5b1256992fa5830df330190910..f42fba1af5b3b4398335448e9a7426ba2f2644b2 100644
--- a/matlab/octave_ver_less_than.m
+++ b/matlab/octave_ver_less_than.m
@@ -14,9 +14,23 @@ function r = octave_ver_less_than(verstr)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
 
   cur_verstr = version();
   
diff --git a/matlab/plot_priors.m b/matlab/plot_priors.m
index 3eb6a356096a7f198142f305299141f30d01d1dc..a8ee237c6a4c88dd0bb06a6410695931d2a88f16 100644
--- a/matlab/plot_priors.m
+++ b/matlab/plot_priors.m
@@ -11,9 +11,23 @@ function plot_priors
 %    
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2004-2008)
-% Gnu Public License.
+
+% Copyright (C) 2004-2008 Dynare Team
+%
+% This file is part of Dynare.
+%
+% Dynare is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 global bayestopt_ M_ options_
 
diff --git a/matlab/posterior_analysis.m b/matlab/posterior_analysis.m
index 14c80e33582ea57fe120c2213bbb7205a537e2f4..15b656514e4b271cddfc501c92a5c957dac11ecf 100644
--- a/matlab/posterior_analysis.m
+++ b/matlab/posterior_analysis.m
@@ -1,6 +1,21 @@
 function oo_ = posterior_analysis(type,arg1,arg2,arg3,options_,M_,oo_)  
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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/>.
     
     info = check_posterior_analysis_data(type,M_);
     SampleSize = options_.PosteriorSampleSize;
diff --git a/matlab/posterior_moments.m b/matlab/posterior_moments.m
index 9686b1dab95fe9fbceeb117756ccae526f26731a..767ded965297610122f2545032b7046da5628222 100644
--- a/matlab/posterior_moments.m
+++ b/matlab/posterior_moments.m
@@ -20,8 +20,23 @@ function [post_mean, post_median, post_var, hpd_interval, post_deciles, density]
 %    Other matlab routines distributed with Dynare: mh_optimal_bandwidth.m 
 %                                                   kernel_density_estimate.m.
 %
-% part of DYNARE, copyright Dynare Team (2005-2008)
-% Gnu Public License.
+
+% Copyright (C) 2005-2008 Dynare Team
+%
+% 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/>.
 
 xx = xx(:);
 xx = sort(xx);
diff --git a/matlab/prior_bounds.m b/matlab/prior_bounds.m
index 8cb6a78d3d5f7a606965231a2d40b5059a5c3cd9..489400642690a323efc6f19aa34f18c1ee2bbfd2 100644
--- a/matlab/prior_bounds.m
+++ b/matlab/prior_bounds.m
@@ -1,5 +1,4 @@
 function bounds = prior_bounds(bayestopt)
-
 % function bounds = prior_bounds(bayestopt)
 % computes practical bounds for prior density
 %
@@ -11,10 +10,23 @@ function bounds = prior_bounds(bayestopt)
 %    
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
 
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 options_
 
diff --git a/matlab/prior_draw.m b/matlab/prior_draw.m
index e833fa5e97513b4a3d8fe3b78579baad034771c3..f573879eed5075aa8318690e2f2dbba77beec998 100644
--- a/matlab/prior_draw.m
+++ b/matlab/prior_draw.m
@@ -1,5 +1,4 @@
 function pdraw = prior_draw(init,cc)
-
 % function pdraw = prior_draw(init,cc)
 % Builds one draw from the prior distribution. 
 % 
@@ -15,10 +14,23 @@ function pdraw = prior_draw(init,cc)
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
 
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 estim_params_  bayestopt_
 persistent fname npar bounds pshape pmean pstd a b p1 p2 p3 p4 condition
diff --git a/matlab/priordens.m b/matlab/priordens.m
index f1d4bbaac537d09e7af78c5d5b135f6d4bbfa6a8..a59196cafacea3387592ffef4e1051a8ece69be1 100644
--- a/matlab/priordens.m
+++ b/matlab/priordens.m
@@ -22,9 +22,23 @@ function lnprior = priordens(para, pshape, p1, p2, p3, p4)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
 lnprior = 0;
 nprio 	= length(pshape);
diff --git a/matlab/qz/mjdgges.m b/matlab/qz/mjdgges.m
index f4544cbcf0b90a868386bf8734e65edf31389e25..819a3d92241256a3a41fc72ab8534f9779f28a93 100644
--- a/matlab/qz/mjdgges.m
+++ b/matlab/qz/mjdgges.m
@@ -1,4 +1,5 @@
 function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
+%function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
 % QZ decomposition, Sims' codes are used.
 %
 % INPUTS
@@ -19,10 +20,23 @@ function [ss,tt,w,sdim,eigval,info] = mjdgges(e,d,qz_criterium)
 %
 % SPECIAL REQUIREMENTS
 %   none.
-%  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2008)
-% Gnu Public License.
+
+% Copyright (C) 1996-2008 Dynare Team
+%
+% 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/>.
     
 % Chek number of inputs and outputs.
 if nargin>3 | nargin<2
diff --git a/matlab/rand_inverse_wishart.m b/matlab/rand_inverse_wishart.m
index e7c4ce2d98a10e44dd22e30518c4e403dcf7c292..f6de993e00f43edb5c5d4b89c68de4c9083dffcc 100644
--- a/matlab/rand_inverse_wishart.m
+++ b/matlab/rand_inverse_wishart.m
@@ -23,8 +23,23 @@ function G = rand_inverse_wishart(m, v, H_inv_upper_chol)
 % SPECIAL REQUIREMENT
 %     none
 %    
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
     X = randn(v, m) * H_inv_upper_chol; 
     
diff --git a/matlab/rand_matrix_normal.m b/matlab/rand_matrix_normal.m
index 63e661d45c6f98c83df1c5165a67397d3fea57b5..32aa4bafd9ee5d505ce9618e69cc564e5a01d99f 100644
--- a/matlab/rand_matrix_normal.m
+++ b/matlab/rand_matrix_normal.m
@@ -19,9 +19,23 @@ function B = rand_matrix_normal(n, p, M, Omega_lower_chol, Sigma_lower_chol)
 %        
 % SPECIAL REQUIREMENTS
 %    Same notations than: http://en.wikipedia.org/wiki/Matrix_normal_distribution
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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/>.
 
     B1 = randn(n * p, 1);
     B2 = kron(Omega_lower_chol, Sigma_lower_chol) * B1;
diff --git a/matlab/rand_multivariate_normal.m b/matlab/rand_multivariate_normal.m
index bdac5e28aee1e96804e640bf4c0f662501283e07..bd70c51dfd7533efd22b37ad5de12681be6e4e7b 100644
--- a/matlab/rand_multivariate_normal.m
+++ b/matlab/rand_multivariate_normal.m
@@ -13,7 +13,22 @@ function draw = rand_multivariate_normal(Mean,Sigma_upper_chol,n)
 %                                   covariance Sigma 
 %        
 % SPECIAL REQUIREMENTS
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
-    draw = Mean + randn(1,n) * Sigma_upper_chol;
\ No newline at end of file
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 = Mean + randn(1,n) * Sigma_upper_chol;
diff --git a/matlab/rand_multivariate_student.m b/matlab/rand_multivariate_student.m
index 216ae70b8078e4739c61d86eb61feca293975f5d..cc4fc0e75a3817f41b19928b5ff59292f386fe9d 100644
--- a/matlab/rand_multivariate_student.m
+++ b/matlab/rand_multivariate_student.m
@@ -17,7 +17,23 @@ function draw = rand_multivariate_student(Mean,Sigma_upper_chol,df)
 %
 % NOTE See Zellner (appendix B.2, 1971) for a definition.     
 %    
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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(Mean);
-    draw = Mean + randn(1,n) * Sigma_upper_chol * sqrt(df/sum(randn(df,1).^2));
\ No newline at end of file
+    draw = Mean + randn(1,n) * Sigma_upper_chol * sqrt(df/sum(randn(df,1).^2));
diff --git a/matlab/random_walk_metropolis_hastings.m b/matlab/random_walk_metropolis_hastings.m
index f837d0355470c41926ecbaf451ea5965283dc89b..b795aea743cd451e4e488a25a0819b10678eccb0 100644
--- a/matlab/random_walk_metropolis_hastings.m
+++ b/matlab/random_walk_metropolis_hastings.m
@@ -1,4 +1,5 @@
 function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin)
+%function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin)
 % Random walk Metropolis-Hastings algorithm. 
 % 
 % INPUTS 
@@ -17,9 +18,24 @@ function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bou
 %
 % SPECIAL REQUIREMENTS
 %   None.
-%  
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 M_ options_ bayestopt_
 %%%%
 %%%% Initialization of the random walk metropolis-hastings chains.
diff --git a/matlab/resid.m b/matlab/resid.m
index 94e51960e533916b3a11516ea557a1e681ff2e4a..0a92568042f9c090c5a9a96f2cd6026998795b5e 100644
--- a/matlab/resid.m
+++ b/matlab/resid.m
@@ -1,5 +1,4 @@
 function resid(period)
-%
 % function resid(period)
 % Computes residuals associated with the guess values
 % 
@@ -11,11 +10,23 @@ function resid(period)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
-
 
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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 M_ options_ oo_ it_ endval_ z
   
diff --git a/matlab/resol.m b/matlab/resol.m
index 116450a8fa60f76bd6996a1f69cb582e319456b5..e453bbcc778b5477b831762fdcf7c22d2559b9ab 100644
--- a/matlab/resol.m
+++ b/matlab/resol.m
@@ -21,9 +21,23 @@ function [dr,info]=resol(ys,check_flag)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
+
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ options_ oo_ bayestopt_
 global it_
diff --git a/matlab/rndprior.m b/matlab/rndprior.m
index 04bef9c655faa60c46e622426ee90cdb8da9caf0..786299bc1cf7ed0c6a30050f6173bc82047c56cc 100644
--- a/matlab/rndprior.m
+++ b/matlab/rndprior.m
@@ -1,6 +1,4 @@
 function y = rndprior(bayestopt_)
-
-
 % function y = rndprior(bayestopt_)
 % Draws random number from the prior density
 %
@@ -12,10 +10,23 @@ function y = rndprior(bayestopt_)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2007)
-% Gnu Public License.
 
+% Copyright (C) 2003-2007 Dynare Team
+%
+% 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/>.
 
 pshape=bayestopt_.pshape;
 pmean=bayestopt_.pmean;
diff --git a/matlab/rplot.m b/matlab/rplot.m
index b35b636afb41c273ce3bc877a8be6fc4e8fd6d69..939eca92c689f660307d2dc038df02fca3398310 100644
--- a/matlab/rplot.m
+++ b/matlab/rplot.m
@@ -1,6 +1,4 @@
-
 function rplot(s1)
-		
 % function rplot(s1)
 % This optionnal command creates the plot of the variable trajectory. By default, the entire simulation period is
 % ploted. The instruction DSAMPLE permits to reduce the number of periods in the plot.
@@ -14,10 +12,23 @@ function rplot(s1)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_ options_
 
diff --git a/matlab/selec_posterior_draws.m b/matlab/selec_posterior_draws.m
index e07d3bbc0f88ca432d4f442a71ac0983ec8851c9..8749fdd7cc9206a3f81e0142b3b60d4ec28830e2 100644
--- a/matlab/selec_posterior_draws.m
+++ b/matlab/selec_posterior_draws.m
@@ -19,8 +19,23 @@ function SampleAddress = selec_posterior_draws(SampleSize,drsize)
 % SPECIAL REQUIREMENTS
 %   None.
 % 
-% part of DYNARE, copyright Dynare Team (2006-2008)
-% Gnu Public License.
+
+% Copyright (C) 2006-2008 Dynare Team
+%
+% 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 M_ options_ estim_params_ oo_
         
diff --git a/matlab/set_default_option.m b/matlab/set_default_option.m
index c7e355eb350f47945c2027f0c44ef939420f8b1b..9b390c127aacd9c4fa4a4d47d7c705ad545aba79 100644
--- a/matlab/set_default_option.m
+++ b/matlab/set_default_option.m
@@ -13,9 +13,23 @@ function options=set_default_option(options,field,default)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 ~isfield(options,field)
     options.(field) = default;
diff --git a/matlab/set_prior.m b/matlab/set_prior.m
index ec20b7829484035984a17cbfb4fc83fc9fb55cd0..ef278b2e82c30f1a980539990646b5f096825ab3 100644
--- a/matlab/set_prior.m
+++ b/matlab/set_prior.m
@@ -1,5 +1,4 @@
 function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
-
 % function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
 % sets prior distributions
 %
@@ -15,10 +14,23 @@ function [xparam1,estim_params_,bayestopt_,lb,ub]=set_prior(estim_params_)
 %    
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
 
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 M_ options_
   
diff --git a/matlab/set_shocks.m b/matlab/set_shocks.m
index 41d4a0413c7442d0c1b22ae07d824938e2b9f113..e32bddf5c342eab536d3e106ad967ca531bd7bbe 100644
--- a/matlab/set_shocks.m
+++ b/matlab/set_shocks.m
@@ -17,9 +17,23 @@ function set_shocks(flag,k,ivar,values)
 %        
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2003-2008)
-% Gnu Public License.
+
+% Copyright (C) 2003-2008 Dynare Team
+%
+% 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 oo_ M_
   
diff --git a/matlab/set_state_space.m b/matlab/set_state_space.m
index 6f02dc6be3b3ea9537446e2c4559c22450fa1b04..0a4e2547fd0ffbde51f89acaf860dfdaa4260171 100644
--- a/matlab/set_state_space.m
+++ b/matlab/set_state_space.m
@@ -14,9 +14,23 @@ function dr=set_state_space(dr,M_)
 % SPECIAL REQUIREMENTS
 %   none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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/>.
 
 xlen = M_.maximum_endo_lead + M_.maximum_endo_lag + 1;
 klen = M_.maximum_endo_lag + M_.maximum_endo_lead + 1;
diff --git a/matlab/sim1.m b/matlab/sim1.m
index 5e984717d9a7563029f0c2d8d7e6d3ed7720b95d..6bdafbb2857df9bb07202b2ec6533f04fbec4501 100644
--- a/matlab/sim1.m
+++ b/matlab/sim1.m
@@ -16,9 +16,23 @@ function sim1
 % SPECIAL REQUIREMENTS
 %   None.
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 M_ options_ oo_
 global  iyp iyf ct_ M_ it_ c
diff --git a/matlab/simk.m b/matlab/simk.m
index 3631b48f2a82daf2fe0d608549ad650d651fda22..3309d7867860e8362a1901d952857c18849d99a6 100644
--- a/matlab/simk.m
+++ b/matlab/simk.m
@@ -16,9 +16,24 @@ function simk
 % SPECIAL REQUIREMENTS
 %   None.
 %  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 M_ options_ oo_
 global it_ iyr0 ct_ broyden_
 
diff --git a/matlab/simul.m b/matlab/simul.m
index 24ebe1965874d80676c4492279bf606a4fb380df..67db669f825464fbb1cd2fe43701a0a5d8d563d2 100644
--- a/matlab/simul.m
+++ b/matlab/simul.m
@@ -11,10 +11,23 @@ function simul(dr)
 %   ...
 % SPECIAL REQUIREMENTS
 %   none
-%  
-%  
-% part of DYNARE, copyright Dynare Team (1996-2007)
-% Gnu Public License.
+
+% Copyright (C) 1996-2007 Dynare Team
+%
+% 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 M_ options_ oo_ 
 global ys0_ ct_ endval_ 
diff --git a/matlab/simult.m b/matlab/simult.m
index 91e1c06ae00c9939eb3c4867a4dda3c3333199fb..dcd88d99caf02a71c14b6550b4dc0e493e18c4f7 100644
--- a/matlab/simult.m
+++ b/matlab/simult.m
@@ -1,3 +1,4 @@
+function y_=simult(ys, dr)
 % function y_=simult(ys, dr)
 % Recursive Monte Carlo simulations
 %
@@ -11,12 +12,24 @@
 % SPECIAL REQUIREMENTS
 %    none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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/>.
 
-function y_=simult(ys, dr)
 global M_ options_ oo_
 global  it_ means_
 
diff --git a/matlab/simult_.m b/matlab/simult_.m
index b5ed86699a29c5f1536e28cbae9cf8683640ea76..5a7294bdbff108db202d7c1fcd8acaf040d325e0 100644
--- a/matlab/simult_.m
+++ b/matlab/simult_.m
@@ -15,9 +15,23 @@
 % SPECIAL REQUIREMENTS
 %    none
 %  
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
+
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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/>.
 
 function y_=simult_(y0,dr,ex_,iorder)
 global M_ options_ it_
diff --git a/matlab/solve1.m b/matlab/solve1.m
index abe6a30d4f02565cbfa3fc8d4fc09d698db6e5c8..9f6f84cbebd89ddd442f906dc4e305f1a28af5dd 100644
--- a/matlab/solve1.m
+++ b/matlab/solve1.m
@@ -1,5 +1,4 @@
 function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
-
 % function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
 % Solves systems of non linear equations of several variables
 %
@@ -18,10 +17,23 @@ function [x,check] = solve1(func,x,j1,j2,jacobian_flag,varargin)
 %
 % SPECIAL REQUIREMENTS
 %    none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2008)
-% Gnu Public License.
 
+% Copyright (C) 2001-2008 Dynare Team
+%
+% 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 M_ options_ fjac  
 
diff --git a/matlab/steady.m b/matlab/steady.m
index 7d3950af1ac05396f6960ace0112645e95886c82..b9031265f4652c27df8f80b1d50dc8cb63d2243d 100644
--- a/matlab/steady.m
+++ b/matlab/steady.m
@@ -1,5 +1,4 @@
 function steady()
-
 % function steady()
 % computes and prints the steady state calculations
 %  
@@ -11,10 +10,23 @@ function steady()
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
 
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_ options_ ys0_ 
 
diff --git a/matlab/steady_.m b/matlab/steady_.m
index 34499332b59b317013f8a59111a8490a5b052510..58e0b8f20599ca3b6ec6672690b28dbecf526159 100644
--- a/matlab/steady_.m
+++ b/matlab/steady_.m
@@ -12,9 +12,23 @@ function steady_()
 %
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2001-2007)
-% Gnu Public License.
+
+% Copyright (C) 2001-2007 Dynare Team
+%
+% 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 M_ oo_ it_ options_
   
diff --git a/matlab/warning_config.m b/matlab/warning_config.m
index 67b2b2af071b8336670b6ea42f0e36d99bfc9c52..a7a9a31af781a45d210d59c017232ec92ceee110 100644
--- a/matlab/warning_config.m
+++ b/matlab/warning_config.m
@@ -9,9 +9,23 @@ function warning_config()
 %        
 % SPECIAL REQUIREMENTS
 %   none
-%  
-% part of DYNARE, copyright Dynare Team (2008)
-% Gnu Public License.
+
+% Copyright (C) 2008 Dynare Team
+%
+% 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 on;
     if exist('OCTAVE_VERSION')