[Pkg-octave-commit] [SCM] Debian packaging for dynare branch, experimental, updated. debian/4.3.1-1-6-g542b5ba

Sébastien Villemot sebastien at debian.org
Wed Jan 23 04:48:11 UTC 2013


The following commit has been merged in the experimental branch:
commit 99a9064923fa03cd269c98c9d93388dcf9584fde
Author: Sébastien Villemot <sebastien at debian.org>
Date:   Wed Jan 23 04:36:13 2013 +0100

    Imported Upstream version 4.3.2

diff --git a/NEWS b/NEWS
index 004cbc1..0a9708c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,40 @@
+Announcement for Dynare 4.3.2 (on 2013-01-18)
+=============================================
+
+We are pleased to announce the release of Dynare 4.3.2.
+
+This is a bugfix release.
+
+The Windows packages are already available for download at:
+
+ http://www.dynare.org/download/dynare-stable
+
+The Mac and GNU/Linux packages (for Debian and Ubuntu) should follow soon.
+
+All users are encouraged to upgrade.
+
+The new release is compatible with MATLAB versions ranging from 7.0 (R14) to
+8.0 (R2012b) and with GNU Octave versions ranging from 3.2 to 3.6.
+
+Here is a list of the problems identified in version 4.3.1 and that have been
+fixed in version 4.3.2:
+
+ - Computation of posterior distribution of unconditional variance
+   decomposition was sometimes crashing (only for very large models)
+
+ - Estimation with `mode_compute=6' was sometimes crashing
+
+ - Derivative of erf() function was incorrect
+
+ - The `check' command was not setting `oo_.dr.eigval' unless `stoch_simul' was
+   also used
+
+ - Computation of conditional forecast when the constraint is only on
+   one period was buggy
+
+ - Estimation with `mode_compute=3' was crashing under Octave
+
+
 Announcement for Dynare 4.3.1 (on 2012-10-10)
 =============================================
 
@@ -6,7 +43,7 @@ minor features and fixes various bugs.
 
 The Windows and Mac packages are already available for download at:
 
- http://www.dynare.org/download/dynare-4.3
+ http://www.dynare.org/download/dynare-stable
 
 The GNU/Linux packages (for Debian and Ubuntu) should follow soon.
 
diff --git a/configure b/configure
index e44d858..02e754a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dynare 4.3.1.
+# Generated by GNU Autoconf 2.69 for dynare 4.3.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dynare'
 PACKAGE_TARNAME='dynare'
-PACKAGE_VERSION='4.3.1'
-PACKAGE_STRING='dynare 4.3.1'
+PACKAGE_VERSION='4.3.2'
+PACKAGE_STRING='dynare 4.3.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1359,7 +1359,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dynare 4.3.1 to adapt to many kinds of systems.
+\`configure' configures dynare 4.3.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1429,7 +1429,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dynare 4.3.1:";;
+     short | recursive ) echo "Configuration of dynare 4.3.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1540,7 +1540,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dynare configure 4.3.1
+dynare configure 4.3.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2035,7 +2035,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dynare $as_me 4.3.1, which was
+It was created by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2851,7 +2851,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dynare'
- VERSION='4.3.1'
+ VERSION='4.3.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -9622,7 +9622,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dynare $as_me 4.3.1, which was
+This file was extended by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9679,7 +9679,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dynare config.status 4.3.1
+dynare config.status 4.3.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 5f6df0b..134454b 100755
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ([2.62])
-AC_INIT([dynare], [4.3.1])
+AC_INIT([dynare], [4.3.2])
 AC_CONFIG_SRCDIR([preprocessor/DynareMain.cc])
 AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability -Werror foreign no-dist-gzip dist-xz tar-pax])
 
diff --git a/doc/dynare.info b/doc/dynare.info
index 5a15b66..6ced270 100644
--- a/doc/dynare.info
+++ b/doc/dynare.info
@@ -6,7 +6,7 @@ START-INFO-DIR-ENTRY
                                   of economic models.
 END-INFO-DIR-ENTRY
 
-   Copyright (C) 1996-2012, Dynare Team.
+   Copyright (C) 1996-2013, Dynare Team.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -23,9 +23,9 @@ File: dynare.info,  Node: Top,  Next: Introduction,  Up: (dir)
 Dynare
 ******
 
-This is Dynare Reference Manual, version 4.3.1.
+This is Dynare Reference Manual, version 4.3.2.
 
-   Copyright (C) 1996-2012, Dynare Team.
+   Copyright (C) 1996-2013, Dynare Team.
 
      Permission is granted to copy, distribute and/or modify this
      document under the terms of the GNU Free Documentation License,
@@ -232,21 +232,21 @@ bear the concomitant performance loss.
 
    The development of Dynare is mainly done at Cepremap
 (http://www.cepremap.ens.fr) by a core team of researchers who devote
-part of their time to software development. Currently the development
+part of their time to software development.  Currently the development
 team of Dynare is composed of Stéphane Adjemian (Université du Maine,
 Gains and Cepremap), Houtan Bastani (Cepremap), Michel Juillard (Banque
 de France), Frédéric Karamé (Université d'Évry, Epee and Cepremap),
 Junior Maih (Norges Bank), Ferhat Mihoubi (Université d'Évry, Epee and
-Cepremap), George Perendia, Johannes Pfeifer, Marco Ratto (JRC) and
-Sébastien Villemot (Cepremap and Paris School of Economics).
-Increasingly, the developer base is expanding, as tools developed by
-researchers outside of Cepremap are integrated into Dynare. Financial
-support is provided by Cepremap, Banque de France and DSGE-net (an
-international research network for DSGE modeling). The Dynare project
-also received funding through the Seventh Framework Programme for
-Research (FP7) of the European Commission's Socio-economic Sciences and
-Humanities (SSH) Program from October 2008 to September 2011 under
-grant agreement SSH-CT-2009-225149.
+Cepremap), George Perendia, Johannes Pfeifer (Universität Tübingen),
+Marco Ratto (JRC) and Sébastien Villemot (Cepremap and Paris School of
+Economics).  Increasingly, the developer base is expanding, as tools
+developed by researchers outside of Cepremap are integrated into
+Dynare. Financial support is provided by Cepremap, Banque de France and
+DSGE-net (an international research network for DSGE modeling). The
+Dynare project also received funding through the Seventh Framework
+Programme for Research (FP7) of the European Commission's
+Socio-economic Sciences and Humanities (SSH) Program from October 2008
+to September 2011 under grant agreement SSH-CT-2009-225149.
 
    Interaction between developers and users of Dynare is central to the
 project. A web forum (http://www.dynare.org/phpBB3) is available for
@@ -283,10 +283,10 @@ File: dynare.info,  Node: Citing Dynare in your research,  Prev: Documentation s
 If you would like to refer to Dynare in a research article, the
 recommended way is to cite the present manual, as follows:
 
-     Stéphane Adjemian, Houtan Bastani, Michel Juillard, Ferhat Mihoubi,
-     George Perendia, Marco Ratto and Sébastien Villemot (2011),
-     "Dynare: Reference Manual, Version 4," Dynare Working Papers, 1,
-     CEPREMAP
+     Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric
+     Karamé, Ferhat Mihoubi, George Perendia, Johannes Pfeifer, Marco
+     Ratto and Sébastien Villemot (2011), "Dynare: Reference Manual,
+     Version 4," Dynare Working Papers, 1, CEPREMAP
 
    Note that citing the Dynare Reference Manual in your research is a
 good way to help the Dynare project.
@@ -778,7 +778,8 @@ observed:
    * INTEGER indicates an integer number;
 
    * DOUBLE indicates a double precision number. The following syntaxes
-     are valid: `1.1e3', `1.1E3', `1.1d3', `1.1D3';
+     are valid: `1.1e3', `1.1E3', `1.1d3', `1.1D3'. In some places,
+     infinite values `Inf' and `-Inf' are also allowed;
 
    * NUMERICAL_VECTOR indicates a vector of numbers separated by spaces,
      enclosed by square brackets;
@@ -2858,9 +2859,11 @@ File: dynare.info,  Node: Computing the stochastic solution,  Next: Typology and
           Order of Taylor approximation. Acceptable values are `1', `2'
           and `3'. Note that for third order, `k_order_solver' option
           is implied and only empirical moments are available (you must
-          provide a value for `periods' option). Default: `2' (except
-          after an `estimation' command, in which case the default is
-          the value used for the estimation).
+          provide a value for `periods' option). A value of `2' or more
+          is incompatible with `block' and `bytecode' options of the
+          `model' block. Default: `2' (except after an `estimation'
+          command, in which case the default is the value used for the
+          estimation).
 
     `k_order_solver'
           Use a k-order solver (implemented in C++) instead of the
@@ -3317,7 +3320,7 @@ the block decomposition of the model (*note block::).
      information.
 
      Only one instance of `varobs' is allowed in a model file. If one
-     needs to declare observed variables in a loop, the macroprocessor
+     needs to declare observed variables in a loop, the macro-processor
      can be used as shown in the second example below.
 
      _Simple example_
@@ -3707,14 +3710,19 @@ the block decomposition of the model (*note block::).
                parameters.
 
          `1'
-               Uses `fmincon' optimization routine (not available under
-               Octave)
+               Uses `fmincon' optimization routine (available under
+               MATLAB if the optimization toolbox is installed; not
+               available under Octave)
 
          `2'
                Value no longer used
 
          `3'
-               Uses `fminunc' optimization routine
+               Uses `fminunc' optimization routine (available under
+               MATLAB if the optimization toolbox is installed;
+               available under Octave if the optim
+               (http://octave.sourceforge.net/optim/) package from
+               Octave-Forge is installed)
 
          `4'
                Uses Chris Sims's `csminwel'
@@ -3855,7 +3863,7 @@ the block decomposition of the model (*note block::).
           the posterior mode. If a Metropolis-Hastings is computed, the
           distribution of forecasts is stored in variables
           `oo_.PointForecast' and `oo_.MeanForecast'. *Note
-          Forecasting:: for a description of these variables.
+          Forecasting::, for a description of these variables.
 
     `tex'
           Requests the printing of results and graphs in TeX tables and
@@ -7039,9 +7047,9 @@ Command and Function Index
 * acos:                                  Built-in Functions.  (line  33)
 * asin:                                  Built-in Functions.  (line  32)
 * atan:                                  Built-in Functions.  (line  34)
-* bvar_density:                          Estimation.          (line 965)
+* bvar_density:                          Estimation.          (line 970)
 * bvar_forecast:                         Forecasting.         (line 240)
-* calib_smoother:                        Estimation.          (line 974)
+* calib_smoother:                        Estimation.          (line 979)
 * change_type:                           Variable declarations.
                                                               (line 112)
 * check:                                 Getting information about the model.
@@ -7070,7 +7078,7 @@ Command and Function Index
 * exp:                                   Built-in Functions.  (line  10)
 * EXPECTATION:                           Operators.           (line  26)
 * extended_path:                         Computing the stochastic solution.
-                                                              (line 337)
+                                                              (line 339)
 * external_function:                     External Functions.  (line  15)
 * forecast:                              Forecasting.         (line  22)
 * histval:                               Initial and terminal conditions.
@@ -7095,7 +7103,7 @@ Command and Function Index
 * max:                                   Built-in Functions.  (line  37)
 * min:                                   Built-in Functions.  (line  38)
 * model:                                 Model declaration.   (line   9)
-* model_comparison:                      Estimation.          (line 904)
+* model_comparison:                      Estimation.          (line 909)
 * model_info:                            Getting information about the model.
                                                               (line  41)
 * ms_compute_mdd:                        Markov-switching SBVAR.
@@ -7140,7 +7148,7 @@ Command and Function Index
                                                               (line  10)
 * save_params_and_steady_state:          Misc commands.       (line  14)
 * set_dynare_seed:                       Misc commands.       (line   7)
-* shock_decomposition:                   Estimation.          (line 922)
+* shock_decomposition:                   Estimation.          (line 927)
 * shocks:                                Shocks on exogenous variables.
                                                               (line  32)
 * sign:                                  Built-in Functions.  (line  26)
@@ -7160,7 +7168,7 @@ Command and Function Index
 * tan:                                   Built-in Functions.  (line  31)
 * trend_var:                             Variable declarations.
                                                               (line 189)
-* unit_root_vars:                        Estimation.          (line 956)
+* unit_root_vars:                        Estimation.          (line 961)
 * var:                                   Variable declarations.
                                                               (line  10)
 * varexo:                                Variable declarations.
@@ -7183,17 +7191,17 @@ Variable Index
 * M_:                                    Dynare invocation.   (line 165)
 * M_.endo_nbr:                           Auxiliary variables. (line  46)
 * M_.orig_endo_nbr:                      Auxiliary variables. (line  46)
-* M_.params <1>:                         Estimation.          (line 724)
+* M_.params <1>:                         Estimation.          (line 729)
 * M_.params:                             Parameter initialization.
                                                               (line  25)
-* M_.Sigma_e:                            Estimation.          (line 724)
+* M_.Sigma_e:                            Estimation.          (line 729)
 * oo_:                                   Dynare invocation.   (line 172)
 * oo_.autocorr:                          Computing the stochastic solution.
-                                                              (line 284)
+                                                              (line 286)
 * oo_.conditional_variance_decomposition: Third order approximation.
                                                               (line  66)
 * oo_.dr:                                Computing the stochastic solution.
-                                                              (line 329)
+                                                              (line 331)
 * oo_.dr.eigval:                         Getting information about the model.
                                                               (line  37)
 * oo_.dr.g_0:                            Third order approximation.
@@ -7233,44 +7241,44 @@ Variable Index
 * oo_.dr.ys:                             First order approximation.
                                                               (line  14)
 * oo_.endo_simul <1>:                    Computing the stochastic solution.
-                                                              (line 141)
+                                                              (line 143)
 * oo_.endo_simul:                        Deterministic simulation.
                                                               (line 109)
 * oo_.exo_simul:                         Deterministic simulation.
                                                               (line 119)
-* oo_.FilteredVariables:                 Estimation.          (line 550)
-* oo_.FilteredVariablesKStepAhead:       Estimation.          (line 591)
-* oo_.FilteredVariablesKStepAheadVariances: Estimation.       (line 591)
+* oo_.FilteredVariables:                 Estimation.          (line 555)
+* oo_.FilteredVariablesKStepAhead:       Estimation.          (line 596)
+* oo_.FilteredVariablesKStepAheadVariances: Estimation.       (line 596)
 * oo_.forecast <1>:                      Forecasting.         (line  93)
-* oo_.forecast:                          Estimation.          (line 566)
+* oo_.forecast:                          Estimation.          (line 571)
 * oo_.gamma_y:                           Computing the stochastic solution.
-                                                              (line 300)
+                                                              (line 302)
 * oo_.irfs:                              Computing the stochastic solution.
-                                                              (line 322)
-* oo_.MarginalDensity.LaplaceApproximation: Estimation.       (line 800)
-* oo_.MarginalDensity.ModifiedHarmonicMean: Estimation.       (line 803)
+                                                              (line 324)
+* oo_.MarginalDensity.LaplaceApproximation: Estimation.       (line 805)
+* oo_.MarginalDensity.ModifiedHarmonicMean: Estimation.       (line 808)
 * oo_.mean:                              Computing the stochastic solution.
-                                                              (line 272)
+                                                              (line 274)
 * oo_.MeanForecast:                      Forecasting.         (line 139)
 * oo_.osr.objective_function:            Optimal policy.      (line  69)
 * oo_.planner_objective_value:           Optimal policy.      (line 109)
 * oo_.PointForecast:                     Forecasting.         (line 128)
-* oo_.posterior_density:                 Estimation.          (line 868)
-* oo_.posterior_hpdinf:                  Estimation.          (line 873)
-* oo_.posterior_hpdsup:                  Estimation.          (line 878)
-* oo_.posterior_mean:                    Estimation.          (line 883)
-* oo_.posterior_mode:                    Estimation.          (line 888)
-* oo_.posterior_std:                     Estimation.          (line 893)
-* oo_.PosteriorIRF.dsge:                 Estimation.          (line 500)
-* oo_.PosteriorTheoreticalMoments:       Estimation.          (line 527)
-* oo_.SmoothedMeasurementErrors:         Estimation.          (line 556)
-* oo_.SmoothedShocks:                    Estimation.          (line 556)
-* oo_.SmoothedVariables:                 Estimation.          (line 556)
+* oo_.posterior_density:                 Estimation.          (line 873)
+* oo_.posterior_hpdinf:                  Estimation.          (line 878)
+* oo_.posterior_hpdsup:                  Estimation.          (line 883)
+* oo_.posterior_mean:                    Estimation.          (line 888)
+* oo_.posterior_mode:                    Estimation.          (line 893)
+* oo_.posterior_std:                     Estimation.          (line 898)
+* oo_.PosteriorIRF.dsge:                 Estimation.          (line 505)
+* oo_.PosteriorTheoreticalMoments:       Estimation.          (line 532)
+* oo_.SmoothedMeasurementErrors:         Estimation.          (line 561)
+* oo_.SmoothedShocks:                    Estimation.          (line 561)
+* oo_.SmoothedVariables:                 Estimation.          (line 561)
 * oo_.steady_state:                      Finding the steady state with Dynare nonlinear solver.
                                                               (line 146)
-* oo_.UpdatedVariables:                  Estimation.          (line 556)
+* oo_.UpdatedVariables:                  Estimation.          (line 561)
 * oo_.var:                               Computing the stochastic solution.
-                                                              (line 278)
+                                                              (line 280)
 * options_:                              Dynare invocation.   (line 168)
 * Sigma_e:                               Shocks on exogenous variables.
                                                               (line 169)
@@ -7281,179 +7289,179 @@ Tag Table:
 Node: Top692
 Node: Introduction3584
 Node: What is Dynare ?3810
-Node: Documentation sources8821
-Node: Citing Dynare in your research9451
-Node: Installation and configuration10183
-Node: Software requirements10448
-Node: Installation of Dynare12497
-Node: On Windows13091
-Node: On Debian GNU/Linux and Ubuntu13839
-Node: On Mac OS X14292
-Node: For other systems15081
-Node: Configuration15519
-Node: For MATLAB15737
-Node: For GNU Octave17014
-Node: Some words of warning18290
-Node: Dynare invocation19236
-Node: The Model file26248
-Node: Conventions26966
-Node: Variable declarations29079
-Ref: predetermined_variables33645
-Node: Expressions36387
-Ref: Expressions-Footnote-137526
-Node: Parameters and variables37875
-Node: Inside the model38288
-Node: Outside the model39937
-Node: Operators40489
-Ref: expectation41295
-Node: Functions41820
-Node: Built-in Functions41984
-Node: External Functions43272
-Node: Parameter initialization45685
-Node: Model declaration46443
-Ref: use_dll48638
-Ref: block49133
-Ref: bytecode49604
-Ref: write_latex_dynamic_model52386
-Ref: Model declaration-Footnote-155116
-Node: Auxiliary variables55269
-Node: Initial and terminal conditions57889
-Node: Shocks on exogenous variables67776
-Node: Other general declarations74677
-Node: Steady state75553
-Node: Finding the steady state with Dynare nonlinear solver76213
-Ref: solve_algo77800
-Node: Using a steady state file84524
-Ref: steady_state_model85371
-Node: Getting information about the model88046
-Node: Deterministic simulation92982
-Ref: oo_.endo_simul97471
-Ref: oo_.exo_simul97960
-Node: Stochastic solution and simulation98383
-Node: Computing the stochastic solution99629
-Ref: ar102367
-Ref: irf103035
-Ref: irf_shocks103231
-Ref: nograph103813
-Ref: nodisplay104137
-Ref: graph_format104312
-Ref: order104643
-Ref: k_order_solver105065
-Ref: aim_solver107018
-Ref: conditional_variance_decomposition = INTEGER107453
-Ref: partial_information108296
-Ref: sylvester108900
-Ref: sylvester_fixed_point_tol109665
-Ref: oo_.autocorr111438
-Node: Typology and ordering of variables114631
-Node: First order approximation117333
-Node: Second order approximation118223
-Node: Third order approximation119681
-Ref: oo_.conditional_variance_decomposition123127
-Node: Estimation123644
-Ref: estimated_params125834
-Ref: estimation_cmd131877
-Ref: datafile132630
-Ref: xls_sheet133031
-Ref: xls_range133119
-Ref: nobs133192
-Ref: nobs1133323
-Ref: first_obs133515
-Ref: prefilter133613
-Ref: presample133768
-Ref: loglinear133893
-Ref: lik_init134831
-Ref: mh_replic135739
-Ref: sub_draws135933
-Ref: mh_recover137088
-Ref: mode_file137311
-Ref: prior_trunc140284
-Ref: load_mh_file140460
-Ref: bayesian_irf141126
-Ref: dsge_var141909
-Ref: dsge_varlag142295
-Ref: moments_varendo142406
-Ref: filtered_vars143521
-Ref: smoother143770
-Ref: forecast144314
-Ref: tex144857
-Ref: kalman_algo145060
-Ref: filter_covariance145140
-Ref: filter_step_ahead145281
-Ref: filter_decomposition145494
-Ref: lyapunov148472
-Ref: lyapunov_fixed_point_tol149830
-Ref: lyapunov_doubling_tol149991
-Ref: Estimation-Footnote-1160771
-Ref: Estimation-Footnote-2160846
-Node: Forecasting161041
-Ref: conf_sig162729
-Ref: Forecasting-Footnote-1169050
-Node: Optimal policy169125
-Ref: osr169560
-Ref: osr_params170536
-Ref: optim_weights170644
-Ref: discretionary_policy173743
-Ref: planner_objective174567
-Node: Sensitivity and identification analysis175154
-Node: Sampling176714
-Node: Stability Mapping177363
-Node: Reduced Form Mapping179079
-Node: RMSE181551
-Node: Screening Analysis185719
-Node: Identification Analysis187323
-Node: Performing Sensitivity and Identification Analysis188675
-Ref: Sampling Options189151
-Ref: morris189857
-Ref: morris_nliv190187
-Ref: morris_ntra190274
-Node: Markov-switching SBVAR199515
-Ref: markov_switching200393
-Ref: ms_chain200589
-Ref: svar201111
-Ref: ms_estimation202124
-Ref: max_block_iterations207434
-Ref: ms_simulation210851
-Ref: file_tag211032
-Ref: output_file_tag211177
-Ref: ms_compute_mdd211865
-Ref: simulation_file_tag212361
-Ref: ms_compute_probabilities213346
-Ref: ms_irf214039
-Ref: horizon214578
-Ref: filtered_probabilities214654
-Ref: error_band_percentiles214932
-Ref: shock_draws215084
-Ref: shocks_per_parameter215186
-Ref: thinning_factor215317
-Ref: free_parameters215464
-Ref: parameter_uncertainty215609
-Ref: regime215756
-Ref: regimes216005
-Ref: median216176
-Ref: ms_forecast216268
-Ref: ms_variance_decomposition217460
-Node: Displaying and saving results218851
-Node: Macro-processing language220018
-Node: Macro expressions222413
-Node: Macro directives224619
-Node: Typical usages228598
-Node: Modularization228913
-Node: Indexed sums or products229750
-Node: Multi-country models230462
-Node: Endogeneizing parameters231220
-Node: MATLAB/Octave loops versus macro-processor loops233515
-Node: Misc commands235086
-Ref: load_params_and_steady_state237441
-Ref: dynare_version238042
-Node: The Configuration File238214
-Node: Dynare Configuration239994
-Node: Parallel Configuration240709
-Node: Examples247175
-Node: Dynare internal documentation and unitary tests248495
-Node: Bibliography250100
-Node: Command and Function Index255135
-Node: Variable Index266229
+Node: Documentation sources8848
+Node: Citing Dynare in your research9478
+Node: Installation and configuration10248
+Node: Software requirements10513
+Node: Installation of Dynare12562
+Node: On Windows13156
+Node: On Debian GNU/Linux and Ubuntu13904
+Node: On Mac OS X14357
+Node: For other systems15146
+Node: Configuration15584
+Node: For MATLAB15802
+Node: For GNU Octave17079
+Node: Some words of warning18355
+Node: Dynare invocation19301
+Node: The Model file26313
+Node: Conventions27031
+Node: Variable declarations29216
+Ref: predetermined_variables33782
+Node: Expressions36524
+Ref: Expressions-Footnote-137663
+Node: Parameters and variables38012
+Node: Inside the model38425
+Node: Outside the model40074
+Node: Operators40626
+Ref: expectation41432
+Node: Functions41957
+Node: Built-in Functions42121
+Node: External Functions43409
+Node: Parameter initialization45822
+Node: Model declaration46580
+Ref: use_dll48775
+Ref: block49270
+Ref: bytecode49741
+Ref: write_latex_dynamic_model52523
+Ref: Model declaration-Footnote-155253
+Node: Auxiliary variables55406
+Node: Initial and terminal conditions58026
+Node: Shocks on exogenous variables67913
+Node: Other general declarations74814
+Node: Steady state75690
+Node: Finding the steady state with Dynare nonlinear solver76350
+Ref: solve_algo77937
+Node: Using a steady state file84661
+Ref: steady_state_model85508
+Node: Getting information about the model88183
+Node: Deterministic simulation93119
+Ref: oo_.endo_simul97608
+Ref: oo_.exo_simul98097
+Node: Stochastic solution and simulation98520
+Node: Computing the stochastic solution99766
+Ref: ar102504
+Ref: irf103172
+Ref: irf_shocks103368
+Ref: nograph103950
+Ref: nodisplay104274
+Ref: graph_format104449
+Ref: order104780
+Ref: k_order_solver105319
+Ref: aim_solver107272
+Ref: conditional_variance_decomposition = INTEGER107707
+Ref: partial_information108550
+Ref: sylvester109154
+Ref: sylvester_fixed_point_tol109919
+Ref: oo_.autocorr111692
+Node: Typology and ordering of variables114885
+Node: First order approximation117587
+Node: Second order approximation118477
+Node: Third order approximation119935
+Ref: oo_.conditional_variance_decomposition123381
+Node: Estimation123898
+Ref: estimated_params126089
+Ref: estimation_cmd132132
+Ref: datafile132885
+Ref: xls_sheet133286
+Ref: xls_range133374
+Ref: nobs133447
+Ref: nobs1133578
+Ref: first_obs133770
+Ref: prefilter133868
+Ref: presample134023
+Ref: loglinear134148
+Ref: lik_init135086
+Ref: mh_replic135994
+Ref: sub_draws136188
+Ref: mh_recover137343
+Ref: mode_file137566
+Ref: prior_trunc140860
+Ref: load_mh_file141036
+Ref: bayesian_irf141702
+Ref: dsge_var142485
+Ref: dsge_varlag142871
+Ref: moments_varendo142982
+Ref: filtered_vars144097
+Ref: smoother144346
+Ref: forecast144890
+Ref: tex145434
+Ref: kalman_algo145637
+Ref: filter_covariance145717
+Ref: filter_step_ahead145858
+Ref: filter_decomposition146071
+Ref: lyapunov149049
+Ref: lyapunov_fixed_point_tol150407
+Ref: lyapunov_doubling_tol150568
+Ref: Estimation-Footnote-1161348
+Ref: Estimation-Footnote-2161423
+Node: Forecasting161618
+Ref: conf_sig163306
+Ref: Forecasting-Footnote-1169627
+Node: Optimal policy169702
+Ref: osr170137
+Ref: osr_params171113
+Ref: optim_weights171221
+Ref: discretionary_policy174320
+Ref: planner_objective175144
+Node: Sensitivity and identification analysis175731
+Node: Sampling177291
+Node: Stability Mapping177940
+Node: Reduced Form Mapping179656
+Node: RMSE182128
+Node: Screening Analysis186296
+Node: Identification Analysis187900
+Node: Performing Sensitivity and Identification Analysis189252
+Ref: Sampling Options189728
+Ref: morris190434
+Ref: morris_nliv190764
+Ref: morris_ntra190851
+Node: Markov-switching SBVAR200092
+Ref: markov_switching200970
+Ref: ms_chain201166
+Ref: svar201688
+Ref: ms_estimation202701
+Ref: max_block_iterations208011
+Ref: ms_simulation211428
+Ref: file_tag211609
+Ref: output_file_tag211754
+Ref: ms_compute_mdd212442
+Ref: simulation_file_tag212938
+Ref: ms_compute_probabilities213923
+Ref: ms_irf214616
+Ref: horizon215155
+Ref: filtered_probabilities215231
+Ref: error_band_percentiles215509
+Ref: shock_draws215661
+Ref: shocks_per_parameter215763
+Ref: thinning_factor215894
+Ref: free_parameters216041
+Ref: parameter_uncertainty216186
+Ref: regime216333
+Ref: regimes216582
+Ref: median216753
+Ref: ms_forecast216845
+Ref: ms_variance_decomposition218037
+Node: Displaying and saving results219428
+Node: Macro-processing language220595
+Node: Macro expressions222990
+Node: Macro directives225196
+Node: Typical usages229175
+Node: Modularization229490
+Node: Indexed sums or products230327
+Node: Multi-country models231039
+Node: Endogeneizing parameters231797
+Node: MATLAB/Octave loops versus macro-processor loops234092
+Node: Misc commands235663
+Ref: load_params_and_steady_state238018
+Ref: dynare_version238619
+Node: The Configuration File238791
+Node: Dynare Configuration240571
+Node: Parallel Configuration241286
+Node: Examples247752
+Node: Dynare internal documentation and unitary tests249072
+Node: Bibliography250677
+Node: Command and Function Index255712
+Node: Variable Index266806
 
 End Tag Table
 
diff --git a/doc/dynare.texi b/doc/dynare.texi
index ad265c0..8c9837e 100644
--- a/doc/dynare.texi
+++ b/doc/dynare.texi
@@ -59,7 +59,7 @@
 @c %**end of header
 
 @copying
-Copyright @copyright{} 1996-2012, Dynare Team.
+Copyright @copyright{} 1996-2013, Dynare Team.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -293,21 +293,22 @@ are willing to bear the concomitant performance loss.
 
 The development of Dynare is mainly done at
 @uref{http://www.cepremap.ens.fr, Cepremap} by a core team of
-researchers who devote part of their time to software
-development. Currently the development team of Dynare is composed of
-Stéphane Adjemian (Université du Maine, Gains and Cepremap), Houtan
-Bastani (Cepremap), Michel Juillard (Banque de France), Frédéric Karamé
+researchers who devote part of their time to software development.
+Currently the development team of Dynare is composed of Stéphane
+Adjemian (Université du Maine, Gains and Cepremap), Houtan Bastani
+(Cepremap), Michel Juillard (Banque de France), Frédéric Karamé
 (Université d'Évry, Epee and Cepremap), Junior Maih (Norges Bank),
-Ferhat Mihoubi (Université d'Évry, Epee and Cepremap), George Perendia,
-Johannes Pfeifer, Marco Ratto (JRC) and Sébastien Villemot (Cepremap and
-Paris School of Economics). Increasingly, the developer base is
-expanding, as tools developed by researchers outside of Cepremap are
-integrated into Dynare. Financial support is provided by Cepremap,
-Banque de France and DSGE-net (an international research network for
-DSGE modeling). The Dynare project also received funding through the
-Seventh Framework Programme for Research (FP7) of the European
-Commission's Socio-economic Sciences and Humanities (SSH) Program from
-October 2008 to September 2011 under grant agreement SSH-CT-2009-225149.
+Ferhat Mihoubi (Université d'Évry, Epee and Cepremap), George
+Perendia, Johannes Pfeifer (Universität Tübingen), Marco Ratto (JRC)
+and Sébastien Villemot (Cepremap and Paris School of Economics).
+Increasingly, the developer base is expanding, as tools developed by
+researchers outside of Cepremap are integrated into Dynare. Financial
+support is provided by Cepremap, Banque de France and DSGE-net (an
+international research network for DSGE modeling). The Dynare project
+also received funding through the Seventh Framework Programme for
+Research (FP7) of the European Commission's Socio-economic Sciences
+and Humanities (SSH) Program from October 2008 to September 2011 under
+grant agreement SSH-CT-2009-225149.
 
 Interaction between developers and users of Dynare is central to the
 project. A @uref{http://www.dynare.org/phpBB3, web forum} is available
@@ -339,9 +340,10 @@ If you would like to refer to Dynare in a research article, the
 recommended way is to cite the present manual, as follows:
 
 @quotation
-Stéphane Adjemian, Houtan Bastani, Michel Juillard, Ferhat Mihoubi,
-George Perendia, Marco Ratto and Sébastien Villemot (2011), ``Dynare:
-Reference Manual, Version 4,'' @i{Dynare Working Papers}, 1, CEPREMAP
+Stéphane Adjemian, Houtan Bastani, Michel Juillard, Frédéric Karamé,
+Ferhat Mihoubi, George Perendia, Johannes Pfeifer, Marco Ratto and
+Sébastien Villemot (2011), ``Dynare: Reference Manual, Version 4,''
+ at i{Dynare Working Papers}, 1, CEPREMAP
 @end quotation
 
 Note that citing the Dynare Reference Manual in your research is a
@@ -837,7 +839,8 @@ mutually exclusive arguments are separated by vertical bars: @samp{|};
 
 @item
 @var{DOUBLE} indicates a double precision number. The following syntaxes
-are valid: @code{1.1e3}, @code{1.1E3}, @code{1.1d3}, @code{1.1D3};
+are valid: @code{1.1e3}, @code{1.1E3}, @code{1.1d3}, @code{1.1D3}. In
+some places, infinite values @code{Inf} and @code{-Inf} are also allowed;
 
 @item
 @var{NUMERICAL_VECTOR} indicates a vector of numbers separated by spaces,
@@ -3060,7 +3063,9 @@ Order of Taylor approximation. Acceptable values are @code{1},
 @code{2} and @code{3}. Note that for third order,
 @code{k_order_solver} option is implied and only empirical moments are
 available (you must provide a value for @code{periods}
-option). Default: @code{2} (except after an @code{estimation} command,
+option). A value of @code{2} or more is incompatible with @code{block}
+and @code{bytecode} options of the @code{model} block. Default:
+ at code{2} (except after an @code{estimation} command,
 in which case the default is the value used for the estimation).
 
 @item k_order_solver
@@ -3589,7 +3594,7 @@ the set of observed variables when solving the model under partial
 information.
 
 Only one instance of @code{varobs} is allowed in a model file. If one
-needs to declare observed variables in a loop, the macroprocessor can
+needs to declare observed variables in a loop, the macro-processor can
 be used as shown in the second example below.
 
 @customhead{Simple example}
@@ -4034,13 +4039,17 @@ but the @code{smoother} option is used, it is a roundabout way to
 compute the smoothed value of the variables of a model with calibrated parameters.
 
 @item 1
-Uses @code{fmincon} optimization routine (not available under Octave)
+Uses @code{fmincon} optimization routine (available under MATLAB if
+the optimization toolbox is installed; not available under Octave)
 
 @item 2
 Value no longer used
 
 @item 3
-Uses @code{fminunc} optimization routine
+Uses @code{fminunc} optimization routine (available under MATLAB if
+the optimization toolbox is installed; available under Octave if the
+ at uref{http://octave.sourceforge.net/optim/,optim} package from
+Octave-Forge is installed)
 
 @item 4
 Uses Chris Sims's @code{csminwel}
@@ -4185,7 +4194,7 @@ stored in variable @code{oo_.forecast} and corresponds to the forecast
 at the posterior mode. If a Metropolis-Hastings is computed, the
 distribution of forecasts is stored in variables
 @code{oo_.PointForecast} and
- at code{oo_.MeanForecast}. @xref{Forecasting} for a description of
+ at code{oo_.MeanForecast}. @xref{Forecasting}, for a description of
 these variables.
 
 @item tex
diff --git a/doc/macroprocessor/macroprocessor.tex b/doc/macroprocessor/macroprocessor.tex
index 432aaef..8d02d99 100644
--- a/doc/macroprocessor/macroprocessor.tex
+++ b/doc/macroprocessor/macroprocessor.tex
@@ -350,10 +350,10 @@ end;
   \item Example setup:
     \begin{description}
     \item[\texttt{modeldesc.mod}:] contains variable declarations, model equations and shocks declarations
-    \item[\texttt{simul.mod}:] includes \texttt{modeldesc.mod}, calibrates parameters and runs stochastic simulations
+    \item[\texttt{simulate.mod}:] includes \texttt{modeldesc.mod}, calibrates parameters and runs stochastic simulations
     \item[\texttt{estim.mod}:] includes \texttt{modeldesc.mod}, declares priors on parameters and runs bayesian estimation
     \end{description}
-  \item Dynare can be called on \texttt{simul.mod} and \texttt{estim.mod}
+  \item Dynare can be called on \texttt{simulate.mod} and \texttt{estim.mod}
   \item But it makes no sense to run it on \texttt{modeldesc.mod}
   \item Advantage: no need to manually copy/paste the whole model (at the beginning) or changes to the model (during development)
   \end{itemize}
@@ -491,7 +491,7 @@ end;
   \frametitle{Endogeneizing parameters (4/4)}
   \framesubtitle{Example implementation}
   \begin{itemize}
-  \item File \texttt{steady.mod}:
+  \item File \texttt{steadystate.mod}:
     \begin{itemize}
     \item begins with \verb+@#define steady = 1+
     \item then with \verb+@#include "modeqs.mod"+
@@ -499,7 +499,7 @@ end;
     \item computes steady state (using guess values for endogenous, including \texttt{alpha})
     \item saves values of parameters and endogenous at steady-state in a file, using the \texttt{save\_params\_and\_steady\_state} command
     \end{itemize}
-  \item File \texttt{simul.mod}:
+  \item File \texttt{simulate.mod}:
     \begin{itemize}
     \item begins with \verb+@#define steady = 0+
     \item then with \verb+@#include "modeqs.mod"+
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 9ffe956..51afb59 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
- at set UPDATED 8 October 2012
- at set UPDATED-MONTH October 2012
- at set EDITION 4.3.1
- at set VERSION 4.3.1
+ at set UPDATED 7 January 2013
+ at set UPDATED-MONTH January 2013
+ at set EDITION 4.3.2
+ at set VERSION 4.3.2
diff --git a/doc/userguide/UserGuide.tex b/doc/userguide/UserGuide.tex
index 93e8370..da2a507 100644
--- a/doc/userguide/UserGuide.tex
+++ b/doc/userguide/UserGuide.tex
@@ -40,7 +40,7 @@ pdftex}
 
 \title{Dynare v4 - User Guide \\ÊPublic beta version}
 \author{\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\  Tommaso Mancini Griffoli\\ tommaso.mancini at stanfordalumni.org}
-\date{This draft: August 2011}
+\date{This draft: January 2013}
 
 \maketitle
 
@@ -50,7 +50,7 @@ pdftex}
 
 ~\vfill
 
-Copyright © 2007-2011 Tommaso Mancini Griffoli
+Copyright © 2007-2013 Tommaso Mancini Griffoli
 
 \bigskip
 
@@ -78,14 +78,14 @@ Thanks very much for your patience and good ideas. Please write either direclty
 Dynare was originally developed by Michel Juillard in Paris, France. Currently, the development team of Dynare is composed of
 
 \begin{itemize}
-\item StŽphane Adjemian (stephane.adjemian``AT''ens.fr)
-\item Houtan Bastani (houtan.bastani``AT''ens.fr)
+\item StŽphane Adjemian (stephane.adjemian``AT''univ-lemans.fr)
+\item Houtan Bastani (houtan``AT''dynare.org)
 \item Michel Juillard (michel.juillard``AT''mjui.fr)
 \item Junior Maih (junior.maih ``AT''gmail.com)
 \item Ferhat Mihoubi (ferhat.mihoubi``AT''univ-evry.fr)
 \item George Perendia (george``AT''perendia.orangehome.co.uk)
 \item Marco Ratto (marco.ratto``AT''jrc.ec.europa.eu)
-\item SŽbastien Villemot (sebastien.villemot``AT''ens.fr)
+\item SŽbastien Villemot (sebastien``AT''dynare.org)
 \end{itemize}
 
 Several parts of Dynare use or have strongly benefited from publicly available programs by G. Anderson, F. Collard, L. Ingber, O. Kamenik, P. Klein, S. Sakata, F. Schorfheide, C. Sims, P. Soederlind and R. Wouters.
diff --git a/doc/userguide/ch-soladv.tex b/doc/userguide/ch-soladv.tex
index 6f39d29..efed6aa 100644
--- a/doc/userguide/ch-soladv.tex
+++ b/doc/userguide/ch-soladv.tex
@@ -146,7 +146,13 @@ To save your simulated variables, you can add the following command at the end o
 \subsection{Referring to external files}
 You may find it convenient to refer to an external file, either to compute the steady state of your model, or when specifying shocks in an external file. The former is described in section \ref{sec:ssshock} of chapter \ref{ch:solbase} when discussing steady states. The advantage of using Matlab, say, to find your model's steady state was clear with respect to Dynare version 3, as the latter resorted to numerical approximations to find steady state values. But Dynare version 4 now uses the same analytical methods available in Matlab. For most usage scenarios, you should therefore do just as  well to ask Dynare to compute your model's steady state (except, maybe, if you want to run loops, to vary your parameter values, for instance, in which case writing a Matlab program may be more handy).\\
 
-But you may also be interested in the second possibility described above, namely of specifying shocks in an external file, to simulate a model based on shocks from a prior estimation, for instance. You could then retrieve the exogenous shocks from the oo\_ file by saving them in a file called datafile.mat. Finally, you could simulate a deterministic model with the shocks saved from the estimation by specifying the source file for the shocks, using the \\ \mbox{\texttt{shocks(shocks\_file = datafile.mat)}} command.
+But you may also be interested in the second possibility described above,
+namely of specifying shocks in an external file, to simulate a model based on
+shocks from a prior estimation, for instance. You could then retrieve the
+exogenous shocks from the oo\_ file by saving them in a file called
+datafile.mat. Finally, you could simulate a deterministic model with the shocks
+saved from the estimation by specifying the source file for the shocks, using
+the \\ \mbox{\texttt{initval\_file(filename = 'datafile.mat')}} command.
 But of course, this is a bit of a workaround, since you could also use the built-in commands in Dynare to generate impulse response functions from estimated shocks, as described in chapter \ref{ch:estbase}. \\
 
 \subsection{Infinite eigenvalues}
diff --git a/doc/version.texi b/doc/version.texi
index 9ffe956..51afb59 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
- at set UPDATED 8 October 2012
- at set UPDATED-MONTH October 2012
- at set EDITION 4.3.1
- at set VERSION 4.3.1
+ at set UPDATED 7 January 2013
+ at set UPDATED-MONTH January 2013
+ at set EDITION 4.3.2
+ at set VERSION 4.3.2
diff --git a/license.txt b/license.txt
index d091691..1a5bb38 100644
--- a/license.txt
+++ b/license.txt
@@ -1,8 +1,8 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: Dynare
-Upstream-Contact: Dynare Team, whose members in 2012 are:
-                  Stéphane Adjemian <stephane.adjemian at ens.fr>
-                  Houtan Bastani <houtan.bastani at ens.fr>
+Upstream-Contact: Dynare Team, whose members in 2013 are:
+                  Stéphane Adjemian <stephane.adjemian at univ-lemans.fr>
+                  Houtan Bastani <houtan at dynare.org>
                   Michel Juillard <michel.juillard at mjui.fr>
                   Frédéric Karamé <frederic.karame at univ-lemans.fr>
                   Junior Maih <junior.maih at gmail.com>
@@ -14,7 +14,7 @@ Upstream-Contact: Dynare Team, whose members in 2012 are:
 Source: http://www.dynare.org
 
 Files: *
-Copyright: 1996-2012 Dynare Team
+Copyright: 1996-2013 Dynare Team
 License: GPL-3+
 
 Files: matlab/AIM/SP*
@@ -68,11 +68,11 @@ Copyright: 2008 Radek Salac
 License: GPL-3+
 
 Files: doc/dynare.texi doc/*.tex doc/*.svg doc/*.dia doc/*.pdf doc/*.bib
-Copyright: 1996-2012 Dynare Team
+Copyright: 1996-2013 Dynare Team
 License: GFDL-NIV-1.3+
 
 Files: doc/userguide/*.tex doc/userguide/*.bib doc/userguide/*.pdf
-Copyright: 2007-2011 Tommaso Mancini Griffoli
+Copyright: 2007-2013 Tommaso Mancini Griffoli
 License: GFDL-NIV-1.3+
 
 Files: doc/dr.tex doc/bvar_a_la_sims.tex
@@ -128,10 +128,6 @@ Files: scripts/dynare.el
 Copyright: 2010 Yannick Kalantzis
 License: GPL-3+
 
-Files: mex/sources/libslicot/*
-Copyright: 2002-2009 NICONET e.V.
-License: GPL-2+
-
 Files: mex/sources/sobol/sobol.hh mex/sources/sobol/initialize_v_array.hh
  mex/sources/sobol/initialize_v_array.inc
 Copyright: 2009 John Burkardt
diff --git a/m4/ax_matio.m4 b/m4/ax_matio.m4
index 7094fd7..57d6907 100644
--- a/m4/ax_matio.m4
+++ b/m4/ax_matio.m4
@@ -40,8 +40,13 @@ AC_ARG_WITH(matio, AC_HELP_STRING([--with-matio=DIR], [prefix to MATIO installat
   CPPFLAGS="$CPPFLAGS_MATIO $CPPFLAGS"
   LDFLAGS="$LDFLAGS_MATIO $LDFLAGS"
 
+  dnl Workaround for the matio from RHEL 6 + EPEL 6
+  dnl If detected, libz is added to LIBS, used for matio test
+  LIBS=""
+  AC_CHECK_LIB([z], [compress])
+
   AC_CHECK_HEADER([matio.h], [], [has_matio=no])
-  AC_CHECK_LIB([matio], [Mat_Open], [LIBADD_MATIO="-lmatio"], [has_matio=no])
+  AC_CHECK_LIB([matio], [Mat_Open], [LIBADD_MATIO="-lmatio $LIBS"], [has_matio=no])
 
   CPPFLAGS="$ac_save_CPPFLAGS"
   LDFLAGS="$ac_save_LDFLAGS"
diff --git a/m4/ax_mexopts.m4 b/m4/ax_mexopts.m4
old mode 100755
new mode 100644
diff --git a/m4/ax_slicot.m4 b/m4/ax_slicot.m4
old mode 100755
new mode 100644
diff --git a/matlab/@dynDate/colon.m b/matlab/@dynDate/colon.m
index cb499d8..69742ea 100644
--- a/matlab/@dynDate/colon.m
+++ b/matlab/@dynDate/colon.m
@@ -31,7 +31,6 @@ function sp = colon(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -48,6 +47,8 @@ function sp = colon(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if nargin~=2
     error('dynTime::colon: I need exactly two input arguments!')
 end
diff --git a/matlab/@dynDate/dynDate.m b/matlab/@dynDate/dynDate.m
index 524bcaa..25e8dc3 100644
--- a/matlab/@dynDate/dynDate.m
+++ b/matlab/@dynDate/dynDate.m
@@ -44,7 +44,6 @@ function date = dynDate(a)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -61,6 +60,8 @@ function date = dynDate(a)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 date = struct;
 
 date.freq = NaN;
diff --git a/matlab/@dynDate/eq.m b/matlab/@dynDate/eq.m
index e699b17..186dd0b 100644
--- a/matlab/@dynDate/eq.m
+++ b/matlab/@dynDate/eq.m
@@ -30,7 +30,6 @@ function c = eq(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = eq(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/format.m b/matlab/@dynDate/format.m
index d308a6f..494dfda 100644
--- a/matlab/@dynDate/format.m
+++ b/matlab/@dynDate/format.m
@@ -28,7 +28,6 @@ function p = format(date)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -45,6 +44,8 @@ function p = format(date)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 
 if nargin~=1
     error('dynDate::format: I need exactly one input argument!')
diff --git a/matlab/@dynDate/ge.m b/matlab/@dynDate/ge.m
index 7c2f8ab..2be9bb4 100644
--- a/matlab/@dynDate/ge.m
+++ b/matlab/@dynDate/ge.m
@@ -31,7 +31,6 @@ function c = ge(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -48,6 +47,8 @@ function c = ge(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if a>b
     c=1;
 else
diff --git a/matlab/@dynDate/gt.m b/matlab/@dynDate/gt.m
index 65b9ca4..5d6ed5e 100644
--- a/matlab/@dynDate/gt.m
+++ b/matlab/@dynDate/gt.m
@@ -30,7 +30,6 @@ function c = gt(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = gt(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/le.m b/matlab/@dynDate/le.m
index 8d77845..6fd1026 100644
--- a/matlab/@dynDate/le.m
+++ b/matlab/@dynDate/le.m
@@ -31,7 +31,6 @@ function c = le(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -48,6 +47,8 @@ function c = le(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if a<b
     c=1;
 else
diff --git a/matlab/@dynDate/lt.m b/matlab/@dynDate/lt.m
index ebd0995..84aa329 100644
--- a/matlab/@dynDate/lt.m
+++ b/matlab/@dynDate/lt.m
@@ -30,7 +30,6 @@ function c = lt(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = lt(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/max.m b/matlab/@dynDate/max.m
index cab6b38..74bcfb1 100644
--- a/matlab/@dynDate/max.m
+++ b/matlab/@dynDate/max.m
@@ -30,7 +30,6 @@ function c = max(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = max(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/min.m b/matlab/@dynDate/min.m
index cb00632..df51fb2 100644
--- a/matlab/@dynDate/min.m
+++ b/matlab/@dynDate/min.m
@@ -30,7 +30,6 @@ function c = min(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = min(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/minus.m b/matlab/@dynDate/minus.m
index fa3d1a9..a037f0a 100644
--- a/matlab/@dynDate/minus.m
+++ b/matlab/@dynDate/minus.m
@@ -32,7 +32,6 @@ function c = minus(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -49,6 +48,8 @@ function c = minus(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ~( isa(a,'dynDate') && isa(b,'dynDate') )
     error(['dynDate::minus: Input arguments ' inputname(1) ' and ' inputname(2) ' must be dynDate objects!'])
 end
diff --git a/matlab/@dynDate/ne.m b/matlab/@dynDate/ne.m
index d639ef3..c00cc22 100644
--- a/matlab/@dynDate/ne.m
+++ b/matlab/@dynDate/ne.m
@@ -30,7 +30,6 @@ function c = ne(a,b)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function c = ne(a,b)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 verbose = 0;
 
 if nargin~=2
diff --git a/matlab/@dynDate/subsref.m b/matlab/@dynDate/subsref.m
index b57b7e7..4a951df 100644
--- a/matlab/@dynDate/subsref.m
+++ b/matlab/@dynDate/subsref.m
@@ -33,7 +33,6 @@ function B = subsref(A,S)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -50,4 +49,6 @@ function B = subsref(A,S)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 B = builtin('subsref', A, S);
\ No newline at end of file
diff --git a/matlab/@dynDate/uminus.m b/matlab/@dynDate/uminus.m
index 7b66f33..56d677a 100644
--- a/matlab/@dynDate/uminus.m
+++ b/matlab/@dynDate/uminus.m
@@ -30,7 +30,6 @@ function b = uminus(a)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function b = uminus(a)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ~isa(a,'dynDate')
     error(['dynDate::uminus: Input argument ' inputname(1) ' must be a dynDate object.'])
 end
diff --git a/matlab/@dynDate/uplus.m b/matlab/@dynDate/uplus.m
index 14da6a5..11d2c95 100644
--- a/matlab/@dynDate/uplus.m
+++ b/matlab/@dynDate/uplus.m
@@ -30,7 +30,6 @@ function b = uplus(a)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -47,6 +46,8 @@ function b = uplus(a)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ~isa(a,'dynDate')
     error(['dynDate::uplus: Input argument ' inputname(1) ' must be a dynDate object.'])
 end
diff --git a/matlab/@dynDates/subsref.m b/matlab/@dynDates/subsref.m
index b5408de..e267e9a 100644
--- a/matlab/@dynDates/subsref.m
+++ b/matlab/@dynDates/subsref.m
@@ -33,7 +33,6 @@ function B = subsref(A,S)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -50,6 +49,8 @@ function B = subsref(A,S)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 B = builtin('subsref', A, S);
 
 if isequal(S(1).type,'.')
diff --git a/matlab/@dynSeries/horzcat.m b/matlab/@dynSeries/horzcat.m
index 1748e18..3adeec1 100644
--- a/matlab/@dynSeries/horzcat.m
+++ b/matlab/@dynSeries/horzcat.m
@@ -40,7 +40,6 @@ function a = horzcat(varargin)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -57,6 +56,8 @@ function a = horzcat(varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if nargin==0 || nargin==1
     error('dynSeries::horzcat: I need at least two input arguments!')
 end
diff --git a/matlab/@dynTime/dynTime.m b/matlab/@dynTime/dynTime.m
index 3d885db..021ac93 100644
--- a/matlab/@dynTime/dynTime.m
+++ b/matlab/@dynTime/dynTime.m
@@ -42,7 +42,6 @@ function sp = dynTime(a)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -59,6 +58,8 @@ function sp = dynTime(a)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 sp = struct;
 
 sp.freq = [];
diff --git a/matlab/cartesian_product_of_sets.m b/matlab/cartesian_product_of_sets.m
index 1368f8e..8781a7e 100644
--- a/matlab/cartesian_product_of_sets.m
+++ b/matlab/cartesian_product_of_sets.m
@@ -32,7 +32,6 @@ function cprod = cartesian_product_of_sets(varargin)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -49,6 +48,8 @@ function cprod = cartesian_product_of_sets(varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 [ F{1:nargin} ] = ndgrid( varargin{:} );
 
 for i=1:nargin
diff --git a/matlab/check.m b/matlab/check.m
index fb17c56..ede7047 100644
--- a/matlab/check.m
+++ b/matlab/check.m
@@ -1,4 +1,4 @@
-function [result,info] = check(M, options, oo)
+function [eigenvalues_,result,info] = check(M, options, oo)
 % Checks determinacy conditions by computing the generalized eigenvalues.
 
 %@info:
@@ -21,6 +21,8 @@ function [result,info] = check(M, options, oo)
 %! @strong{Outputs}
 %! @sp 1
 %! @table @ @var
+%! @item eigenvalues_
+%! Eigenvalues of the model.
 %! @item result
 %! Integer scalar equal to one (BK conditions are satisfied) or zero (otherwise).
 %! @item info
@@ -38,7 +40,7 @@ function [result,info] = check(M, options, oo)
 %! @end deftypefn
 %@eod:
 
-% Copyright (C) 2001-2011 Dynare Team
+% Copyright (C) 2001-2013 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -70,8 +72,6 @@ oo.dr=set_state_space(oo.dr,M);
 
 [dr,info,M,options,oo] = resol(1,M,options,oo);
 
-oo.dr = dr;
-
 if info(1) ~= 0 && info(1) ~= 3 && info(1) ~= 4
     print_info(info, options.noprint);
 end
diff --git a/matlab/dr_block.m b/matlab/dr_block.m
index 0e5088a..f4589ee 100644
--- a/matlab/dr_block.m
+++ b/matlab/dr_block.m
@@ -52,9 +52,6 @@ function [dr,info,M_,options_,oo_] = dr_block(dr,task,M_,options_,oo_)
 
 info = 0;
 verbose = 0;
-if options_.order > 1
-    error('2nd and 3rd order approximation not implemented with block option')
-end
 
 z = repmat(dr.ys,1,M_.maximum_lead + M_.maximum_lag + 1);
 zx = repmat([oo_.exo_simul oo_.exo_det_simul],M_.maximum_lead + M_.maximum_lag + 1, 1);
diff --git a/matlab/dsge_likelihood.m b/matlab/dsge_likelihood.m
index d2c8bb9..bfc8940 100644
--- a/matlab/dsge_likelihood.m
+++ b/matlab/dsge_likelihood.m
@@ -715,12 +715,14 @@ end
 
 if isnan(LIK)
     info = 45;
+    fval = objective_function_penalty_base + 100;
     exit_flag = 0;
     return
 end
 
 if imag(LIK)~=0
     info = 46;
+    fval = objective_function_penalty_base + 100;
     exit_flag = 0;
     return
 end
@@ -753,12 +755,14 @@ fval    = (likelihood-lnprior);
 
 if isnan(fval)
     info = 47;
+    fval = objective_function_penalty_base + 100;
     exit_flag = 0;
     return
 end
 
 if imag(fval)~=0
     info = 48;
+    fval = objective_function_penalty_base + 100;
     exit_flag = 0;
     return
 end
diff --git a/matlab/dsge_simulated_theoretical_variance_decomposition.m b/matlab/dsge_simulated_theoretical_variance_decomposition.m
index ee6fdd2..7059e6d 100644
--- a/matlab/dsge_simulated_theoretical_variance_decomposition.m
+++ b/matlab/dsge_simulated_theoretical_variance_decomposition.m
@@ -125,7 +125,6 @@ for file = 1:NumberOfDrawsFiles
             if ~test% Prepare the last round...
                 Decomposition_array = zeros(NumberOfLinesInTheLastDecompFile,nvar*nexo);
                 NumberOfDecompLines = NumberOfLinesInTheLastDecompFile;
-                DecompFileNumber = DecompFileNumber - 1;
             elseif test<0;
                 Decomposition_array = zeros(MaXNumberOfDecompLines,nvar*nexo);
             else
diff --git a/matlab/dyn_first_order_solver.m b/matlab/dyn_first_order_solver.m
index d251bf6..6ca27ee 100644
--- a/matlab/dyn_first_order_solver.m
+++ b/matlab/dyn_first_order_solver.m
@@ -95,6 +95,7 @@ function [dr,info] = dyn_first_order_solver(jacobia,M_,dr,options,task)
     end
     k1 = find([1:klen] ~= M_.maximum_endo_lag+1);
     a = aa(:,nonzeros(lead_lag_incidence(k1,:)'));
+    b = zeros(M_.endo_nbr,M_.endo_nbr);
     b(:,cols_b) = aa(:,cols_j);
     b10 = b(1:nstatic,1:nstatic);
     b11 = b(1:nstatic,nstatic+1:end);
diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m
index 4f4fa37..de75ec4 100644
--- a/matlab/dynare_estimation_1.m
+++ b/matlab/dynare_estimation_1.m
@@ -12,7 +12,7 @@ function dynare_estimation_1(var_list_,dname)
 % SPECIAL REQUIREMENTS
 %   none
 
-% Copyright (C) 2003-2012 Dynare Team
+% Copyright (C) 2003-2013 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -189,6 +189,12 @@ end
 if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
     switch options_.mode_compute
       case 1
+        if exist('OCTAVE_VERSION')
+            error('Option mode_compute=1 is not available under Octave')
+        elseif ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=1 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','LargeScale','off', ...
                                  'MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
@@ -202,6 +208,12 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
       case 2
         error('ESTIMATION: mode_compute=2 option (Lester Ingber''s Adaptive Simulated Annealing) is no longer available')
       case 3
+        if exist('OCTAVE_VERSION') && ~user_has_octave_forge_package('optim')
+            error('Option mode_compute=3 requires the optim package')
+        elseif ~exist('OCTAVE_VERSION') && ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=3 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','MaxFunEvals',100000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
             eval(['optim_options = optimset(optim_options,' options_.optim_opt ');']);
@@ -209,7 +221,14 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
         if options_.analytic_derivation,
             optim_options = optimset(optim_options,'GradObj','on');
         end
-        [xparam1,fval,exitflag] = fminunc(objective_function,xparam1,optim_options,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
+        if ~exist('OCTAVE_VERSION')
+            [xparam1,fval,exitflag] = fminunc(objective_function,xparam1,optim_options,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
+        else
+            % Under Octave, use a wrapper, since fminunc() does not have a 4th arg
+            func = @(x) objective_function(x, dataset_,options_,M_,estim_params_,bayestopt_,oo_);
+            [xparam1,fval,exitflag] = fminunc(func,xparam1,optim_options);
+        end
+
       case 4
         H0 = 1e-4*eye(nx);
         crit = 1e-7;
@@ -326,6 +345,12 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
         end
       case 7
         % Matlab's simplex (Optimization toolbox needed).
+        if exist('OCTAVE_VERSION') && ~user_has_octave_forge_package('optim')
+            error('Option mode_compute=7 requires the optim package')
+        elseif ~exist('OCTAVE_VERSION') && ~user_has_matlab_license('optimization_toolbox')
+            error('Option mode_compute=7 requires the Optimization Toolbox')
+        end
+
         optim_options = optimset('display','iter','MaxFunEvals',1000000,'MaxIter',6000,'TolFun',1e-8,'TolX',1e-6);
         if isfield(options_,'optim_opt')
             eval(['optim_options = optimset(optim_options,' options_.optim_opt ');']);
@@ -900,7 +925,9 @@ if (any(bayestopt_.pshape  >0 ) && options_.mh_replic) || ...
         if options_.mh_replic
             [marginal,oo_] = marginal_density(M_, options_, estim_params_, oo_);
             oo_ = GetPosteriorParametersStatistics(estim_params_, M_, options_, bayestopt_, oo_);
-            oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt_, oo_);
+            if ~options_.nograph
+                oo_ = PlotPosteriorDistributions(estim_params_, M_, options_, bayestopt_, oo_);
+            end
             [oo_.posterior.metropolis.mean,oo_.posterior.metropolis.variance] ...
                 = GetPosteriorMeanVariance(M_,options_.mh_drop);
         else
diff --git a/matlab/dynare_solve.m b/matlab/dynare_solve.m
index 72555ed..a6129fd 100644
--- a/matlab/dynare_solve.m
+++ b/matlab/dynare_solve.m
@@ -35,7 +35,36 @@ function [x,info] = dynare_solve(func,x,jacobian_flag,varargin)
 
 global options_
 
+tolf = options_.solve_tolf ;
 info = 0;
+nn = size(x,1);
+
+% checking initial values
+if jacobian_flag
+    [fvec,fjac] = feval(func,x,varargin{:});
+else
+    fvec = feval(func,x,varargin{:});
+    fjac = zeros(nn,nn) ;
+end
+
+i = find(~isfinite(fvec));
+
+if ~isempty(i)
+    disp(['STEADY:  numerical initial values or parameters incompatible with the following' ...
+          ' equations'])
+    disp(i')
+    disp('Please check for example')
+    disp('   i) if all parameters occurring in these equations are defined')
+    disp('  ii) that no division by an endogenous variable initialized to 0 occurs') 
+    info = 1;
+    x = NaN;
+    return;
+end
+
+if max(abs(fvec)) < tolf
+    return ;
+end
+
 if options_.solve_algo == 0
     if ~exist('OCTAVE_VERSION')
         if ~user_has_matlab_license('optimization_toolbox')
@@ -60,7 +89,7 @@ if options_.solve_algo == 0
         func = @(x) func2(x, varargin{:});
         % The Octave version of fsolve does not converge when it starts from the solution
         fvec = feval(func,x);
-        if max(abs(fvec)) >= options_.solve_tolf
+        if max(abs(fvec)) >= tolf
             [x,fval,exitval,output] = fsolve(func,x,options);
         else
             exitval = 3;
@@ -73,35 +102,8 @@ if options_.solve_algo == 0
         info = 1;
     end
 elseif options_.solve_algo == 1
-    nn = size(x,1);
     [x,info]=solve1(func,x,1:nn,1:nn,jacobian_flag,1,varargin{:});
 elseif options_.solve_algo == 2 || options_.solve_algo == 4
-    nn = size(x,1) ;
-    tolf = options_.solve_tolf ;
-
-    if jacobian_flag
-        [fvec,fjac] = feval(func,x,varargin{:});
-    else
-        fvec = feval(func,x,varargin{:});
-        fjac = zeros(nn,nn) ;
-    end
-
-    i = find(~isfinite(fvec));
-    
-    if ~isempty(i)
-        disp(['STEADY:  numerical initial values incompatible with the following' ...
-              ' equations'])
-        disp(i')
-        disp('Please check for example')
-        disp('   i) if all parameters occurring in these equations are defined')
-        disp('  ii) that no division by an endogenous variable initialized to 0 occurs') 
-        error('exiting ...')
-    end
-    
-    if max(abs(fvec)) < tolf
-        return ;
-    end
-
     if ~jacobian_flag
         fjac = zeros(nn,nn) ;
         dh = max(abs(x),options_.gstep(1)*ones(nn,1))*eps^(1/3);
diff --git a/matlab/gauss_hermite_weights_and_nodes.m b/matlab/gauss_hermite_weights_and_nodes.m
index 5946ac2..40287cb 100644
--- a/matlab/gauss_hermite_weights_and_nodes.m
+++ b/matlab/gauss_hermite_weights_and_nodes.m
@@ -32,7 +32,6 @@ function [nodes,weights] = gauss_hermite_weights_and_nodes(n)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -49,6 +48,8 @@ function [nodes,weights] = gauss_hermite_weights_and_nodes(n)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 b = sqrt([1:n-1]/2);
 JacobiMatrix = diag(b,1)+diag(b,-1);
 [JacobiEigenVectors,JacobiEigenValues] = eig(JacobiMatrix);
diff --git a/matlab/getJJ.m b/matlab/getJJ.m
index b717858..fab0f0d 100644
--- a/matlab/getJJ.m
+++ b/matlab/getJJ.m
@@ -37,7 +37,7 @@ if kronflag == -1,
     gp = fjaco(fun,[sqrt(diag(M_.Sigma_e(indexo,indexo))); M_.params(indx)],M_, oo_, indx,indexo,-1);
     M_.params = params0;
     offset = length(indexo);
-    gp = gp(1:M_.endo_nbr,offset+1:end);
+    gp = gp(:,offset+1:end);
     dYss = H(1:M_.endo_nbr,offset+1:end);
     dA = reshape(H(M_.orig_endo_nbr+[1:numel(A)],:),[size(A),size(H,2)]);
     dOm = dA*0;
diff --git a/matlab/ident_bruteforce.m b/matlab/ident_bruteforce.m
index 592ffcd..a5f6094 100644
--- a/matlab/ident_bruteforce.m
+++ b/matlab/ident_bruteforce.m
@@ -84,7 +84,9 @@ for ll = 1:n,
         for i=1:k,
             plist='';
             for ii=1:ll,
-                plist = [plist ' $' pnames_TeX(pars{i,ll}(ii),:) '$ '];
+                if ~isnan(pars{i,ll}),
+                    plist = [plist ' $' pnames_TeX(pars{i,ll}(ii),:) '$ '];
+                end
             end
             fprintf(fidTeX,'$%s$ & [%s] & %7.3f \\\\ \n',...
                 pnames_TeX(i,:),...
diff --git a/matlab/identification_analysis.m b/matlab/identification_analysis.m
index 2c0b701..11a9de1 100644
--- a/matlab/identification_analysis.m
+++ b/matlab/identification_analysis.m
@@ -82,7 +82,7 @@ if info(1)==0,
     derivatives_info.DOm=dOm;
     derivatives_info.DYss=dYss;
     if init,
-        indJJ = (find(max(abs(JJ'))>1.e-8));
+        indJJ = (find(max(abs(JJ'),[],1)>1.e-8));
         while length(indJJ)<nparam && nlags<10,
             disp('The number of moments with non-zero derivative is smaller than the number of parameters')
             disp(['Try increasing ar = ', int2str(nlags+1)])           
@@ -99,8 +99,8 @@ if info(1)==0,
             disp('Either further increase ar or reduce the list of estimated parameters')           
             error('IDETooManyParams',''),
         end
-        indH = (find(max(abs(H'))>1.e-8));
-        indLRE = (find(max(abs(gp'))>1.e-8));
+        indH = (find(max(abs(H'),[],1)>1.e-8));
+        indLRE = (find(max(abs(gp'),[],1)>1.e-8));
     end
     TAU(:,1)=tau(indH);
     LRE(:,1)=vg1(indLRE);
@@ -230,16 +230,31 @@ if info(1)==0,
 %         quant(isok,:) = siH(isok,:)./repmat(TAU(isok,1),1,nparam);
 %         quant(inok,:) = siH(inok,:)./repmat(mean(abs(TAU)),length(inok),nparam);
 %         quant = siH./repmat(sqrt(diag(chh)),1,nparam);
-        quant = siH./repmat(sqrt(diag_chh),1,nparam);
-        siHnorm = vnorm(quant).*normaliz1;
+        iy = find(diag_chh);
+        indH=indH(iy);
+        siH=siH(iy,:);
+        if ~isempty(iy),
+            quant = siH./repmat(sqrt(diag_chh(iy)),1,nparam);
+            siHnorm = vnorm(quant).*normaliz1;
+        else
+            siHnorm = [];
+        end
         %                 siHnorm = vnorm(siH./repmat(TAU,1,nparam)).*normaliz;
         quant=[];
 %         inok = find((abs(LRE)<1.e-8));
 %         isok = find((abs(LRE)>=1.e-8));
 %         quant(isok,:) = siLRE(isok,:)./repmat(LRE(isok,1),1,np);
 %         quant(inok,:) = siLRE(inok,:)./repmat(mean(abs(LRE)),length(inok),np);
-        quant = siLRE./repmat(sqrt(diag(clre)),1,np);
-        siLREnorm = vnorm(quant).*normaliz1(offset+1:end);
+        diag_clre = diag(clre);
+        iy = find(diag_clre);
+        indLRE=indLRE(iy);
+        siLRE=siLRE(iy,:);
+        if ~isempty(iy),
+            quant = siLRE./repmat(sqrt(diag_clre(iy)),1,np);
+            siLREnorm = vnorm(quant).*normaliz1(offset+1:end);
+        else
+            siLREnorm=[];
+        end
         %                 siLREnorm = vnorm(siLRE./repmat(LRE,1,nparam-offset)).*normaliz(offset+1:end);
         ide_hess.ide_strength_J=ide_strength_J; 
         ide_hess.ide_strength_J_prior=ide_strength_J_prior; 
diff --git a/matlab/imcforecast.m b/matlab/imcforecast.m
index 51d4c19..3a60857 100644
--- a/matlab/imcforecast.m
+++ b/matlab/imcforecast.m
@@ -171,11 +171,8 @@ for i=1:n1
     mu(jdx(i),i) = 1;
 end
 
-if (size(constrained_paths,2) == 1);
-    constrained_paths = constrained_paths*ones(1,cL);
-else
-    cL = size(constrained_paths,2);
-end
+% number of periods with constrained values
+cL = size(constrained_paths,2);
 
 constrained_paths = bsxfun(@minus,constrained_paths,trend(idx,1:cL));
 
diff --git a/matlab/kronecker/A_times_B_kronecker_C.m b/matlab/kronecker/A_times_B_kronecker_C.m
index dad073c..e46306f 100644
--- a/matlab/kronecker/A_times_B_kronecker_C.m
+++ b/matlab/kronecker/A_times_B_kronecker_C.m
@@ -44,7 +44,6 @@ function [D, err] = A_times_B_kronecker_C(A,B,C,fake)
 %@eod:
 
 % Copyright (C) 1996-2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -61,6 +60,8 @@ function [D, err] = A_times_B_kronecker_C(A,B,C,fake)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 % Chek number of inputs and outputs.
 if nargin>4 || nargin<3
     error('A_times_B_kronecker_C takes 3 or 4 input arguments and provides 2 output arguments.')
diff --git a/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m b/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
index fffe806..09be1b7 100644
--- a/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
+++ b/matlab/kronecker/sparse_hessian_times_B_kronecker_C.m
@@ -46,7 +46,6 @@ function [D, err] = sparse_hessian_times_B_kronecker_C(varargin)
 %@eod:
 
 % Copyright (C) 1996-2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -63,6 +62,8 @@ function [D, err] = sparse_hessian_times_B_kronecker_C(varargin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 A = varargin{1};
 B = varargin{2};
 C = varargin{3};
diff --git a/matlab/model_diagnostics.m b/matlab/model_diagnostics.m
index 3118bb2..5506de6 100644
--- a/matlab/model_diagnostics.m
+++ b/matlab/model_diagnostics.m
@@ -16,7 +16,7 @@ function model_diagnostics(M,options,oo)
 %   none.
 %  
 
-% Copyright (C) 1996-2012 Dynare Team
+% Copyright (C) 1996-2013 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -38,13 +38,12 @@ global jacob
 endo_nbr = M.endo_nbr;
 endo_names = M.endo_names;
 lead_lag_incidence = M.lead_lag_incidence;
-maximum_lag = M.maximum_lag;
-maximum_lead = M.maximum_lead;
+maximum_endo_lag = M.maximum_endo_lag;
 
 %
 % missing variables at the current period
 %
-k = find(lead_lag_incidence(maximum_lag+1,:)==0);
+k = find(lead_lag_incidence(maximum_endo_lag+1,:)==0);
 if ~isempty(k)
     disp(['The following endogenous variables aren''t present at ' ...
           'the current period in the model:'])
@@ -58,8 +57,6 @@ end
 %
 info = 0;
 
-it_ = M.maximum_lag + 1 ;
-
 if M.exo_nbr == 0
     oo.exo_steady_state = [] ;
 end
diff --git a/matlab/print_info.m b/matlab/print_info.m
index b406e96..751ab54 100644
--- a/matlab/print_info.m
+++ b/matlab/print_info.m
@@ -55,8 +55,8 @@ if ~noprint
         error('The steadystate file did not compute the steady state')
       case 20
         error(['Impossible to find the steady state. Either the model' ...
-               ' doesn''t have a unique steady state of the guess values' ...
-               ' are too far from the solution'])
+               ' doesn''t have a steady state, there are an infinity of steady states, ' ...
+               ' or the guess values are too far from the solution'])
       case 21
         error('The steady state is complex')
       case 22
diff --git a/matlab/priordens.m b/matlab/priordens.m
index aca29df..5844d3c 100644
--- a/matlab/priordens.m
+++ b/matlab/priordens.m
@@ -75,6 +75,8 @@ if nargin > 6  && initialization == 1
 end
 
 logged_prior_density = 0.0;
+dlprior = 0.0;
+d2lprior = 0.0;
 
 if tt1
     logged_prior_density = logged_prior_density + sum(lpdfgbeta(x(id1),p6(id1),p7(id1),p3(id1),p4(id1))) ;
diff --git a/matlab/smm_objective.m b/matlab/smm_objective.m
index 8067463..030cb98 100644
--- a/matlab/smm_objective.m
+++ b/matlab/smm_objective.m
@@ -15,7 +15,7 @@ function [r,flag] = smm_objective(xparams,sample_moments,weighting_matrix,option
 % SPECIAL REQUIREMENTS
 %  The user has to provide a file where the moment conditions are defined.
 
-% Copyright (C) 2010-2012 Dynare Team
+% Copyright (C) 2010-2013 Dynare Team
 %
 % This file is part of Dynare.
 %
@@ -75,7 +75,7 @@ save('estimated_parameters.mat','xparams');
 
 % Check for local determinacy of the deterministic steady state.
 noprint = options_.noprint; options_.noprint = 1;
-[local_determinacy_and_stability,info] = check(M_,options_,oo_); options_.noprint = noprint;
+[eigval,local_determinacy_and_stability,info] = check(M_,options_,oo_); options_.noprint = noprint;
 if ~local_determinacy_and_stability
     r = priorObjectiveValue * (1+info(2));
     flag = 0;
diff --git a/matlab/solve1.m b/matlab/solve1.m
index 7411127..83d3efb 100644
--- a/matlab/solve1.m
+++ b/matlab/solve1.m
@@ -58,9 +58,11 @@ fvec = fvec(j1);
 i = find(~isfinite(fvec));
 
 if ~isempty(i)
-    disp(['STEADY:  numerical initial values incompatible with the following' ...
-          ' equations'])
+    disp(['SOLVE1: during the resolution of the non-linear system, the evaluation of the following ' ...
+          'equation(s) resulted in a non-finite number:'])
     disp(j1(i)')
+    check = 1;
+    return;
 end
 
 f = 0.5*fvec'*fvec ;
diff --git a/matlab/steady.m b/matlab/steady.m
index 54af1e7..24456b0 100644
--- a/matlab/steady.m
+++ b/matlab/steady.m
@@ -60,15 +60,15 @@ if info(1)
     disp('The last values for which a solution was found are:')
     for i=1:length(ip)
         disp(sprintf('%12s %12.6f',M_.param_names(hv(ip(i),2),:), ...
-                     M_.params(hv(ip(i)))))
+                     M_.params(hv(ip(i),2))))
     end
     for i=1:length(ix)
         disp(sprintf('%12s %12.6f',M_.exo_names(hv(ix(i),2),:), ...
-                     oo_.exo_steady_state(hv(ix(i)))))
+                     oo_.exo_steady_state(hv(ix(i),2))))
     end
     for i=1:length(ixd)
         disp(sprintf('%12s %12.6f',M_.exo_det_names(hv(ixd(i),2),:), ...
-                     oo_.exo_det_steady_state(hv(ixd(i)))))
+                     oo_.exo_det_steady_state(hv(ixd(i),2))))
     end
     
     if options_.homotopy_force_continue
diff --git a/matlab/utilities/dataset/compute_acov.m b/matlab/utilities/dataset/compute_acov.m
index 8e3bec3..a67f24e 100644
--- a/matlab/utilities/dataset/compute_acov.m
+++ b/matlab/utilities/dataset/compute_acov.m
@@ -37,7 +37,6 @@ function dataset_ = compute_acov(dataset_)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -54,6 +53,8 @@ function dataset_ = compute_acov(dataset_)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ~isfield(dataset_.descriptive,'cova')
     dataset_ = compute_cova(dataset_);
 end
diff --git a/matlab/utilities/dataset/compute_corr.m b/matlab/utilities/dataset/compute_corr.m
index 3d56adb..d4a81dc 100644
--- a/matlab/utilities/dataset/compute_corr.m
+++ b/matlab/utilities/dataset/compute_corr.m
@@ -34,7 +34,6 @@ function dataset_ = compute_corr(dataset_)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -51,6 +50,8 @@ function dataset_ = compute_corr(dataset_)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ~isfield(dataset_.descriptive,'cova')
     dataset_ = compute_cova(dataset_);
 end
diff --git a/matlab/utilities/dataset/compute_cova.m b/matlab/utilities/dataset/compute_cova.m
index 12e5cb1..cde4684 100644
--- a/matlab/utilities/dataset/compute_cova.m
+++ b/matlab/utilities/dataset/compute_cova.m
@@ -31,7 +31,6 @@ function dataset_ = compute_cova(dataset_)
 %@eod:
     
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -48,6 +47,8 @@ function dataset_ = compute_cova(dataset_)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 dataset_.descriptive.cova = zeros(dataset_.nvobs);
 
 data = transpose(dataset_.data);
diff --git a/matlab/utilities/dataset/compute_stdv.m b/matlab/utilities/dataset/compute_stdv.m
index 2111e00..2ddbbfc 100644
--- a/matlab/utilities/dataset/compute_stdv.m
+++ b/matlab/utilities/dataset/compute_stdv.m
@@ -31,7 +31,6 @@ function dataset_ = compute_stdv(dataset_)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -48,6 +47,8 @@ function dataset_ = compute_stdv(dataset_)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if dataset_.missing.state
     dataset_.descriptive.stdv = sqrt(nanmean(bsxfun(@power,nandemean(transpose(dataset_.data)),2)));
 else
diff --git a/matlab/utilities/dataset/describe_missing_data.m b/matlab/utilities/dataset/describe_missing_data.m
index b1fbb2c..421e64d 100644
--- a/matlab/utilities/dataset/describe_missing_data.m
+++ b/matlab/utilities/dataset/describe_missing_data.m
@@ -28,7 +28,6 @@ function [i,n,s,j] = describe_missing_data(data)
 %@eod:
     
 % Copyright (C) 2008-2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -45,6 +44,8 @@ function [i,n,s,j] = describe_missing_data(data)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 [observation_index,variable_index] = find(~isnan(data));
 [T,N] = size(data);
 
diff --git a/matlab/utilities/dataset/descriptive_statistics.m b/matlab/utilities/dataset/descriptive_statistics.m
index 06afbdf..3598124 100644
--- a/matlab/utilities/dataset/descriptive_statistics.m
+++ b/matlab/utilities/dataset/descriptive_statistics.m
@@ -46,7 +46,6 @@ function dataset_ = descriptive_statistics(dataset_,statistic,varagin)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -63,6 +62,8 @@ function dataset_ = descriptive_statistics(dataset_,statistic,varagin)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 
 if strcmpi(statistic,'stdv')
     dataset_ = compute_std(dataset_)
diff --git a/matlab/utilities/dataset/initialize_dataset.m b/matlab/utilities/dataset/initialize_dataset.m
index a860cae..b69d5b4 100644
--- a/matlab/utilities/dataset/initialize_dataset.m
+++ b/matlab/utilities/dataset/initialize_dataset.m
@@ -2,7 +2,6 @@ function dataset_ = initialize_dataset(datafile,varobs,first,nobs,transformation
 % Initializes a structure describing the dataset.
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -19,6 +18,8 @@ function dataset_ = initialize_dataset(datafile,varobs,first,nobs,transformation
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if isempty(datafile)
     error('Estimation:: You have to declare a dataset file!')
 end
diff --git a/matlab/utilities/doc/dynInfo.m b/matlab/utilities/doc/dynInfo.m
index 61fa902..c52e8ef 100644
--- a/matlab/utilities/doc/dynInfo.m
+++ b/matlab/utilities/doc/dynInfo.m
@@ -32,7 +32,6 @@ function dynInfo(fun)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -49,6 +48,8 @@ function dynInfo(fun)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if isempty(strfind(fun,'@')) & (~isempty(strfind(fun,'/')) || ~isempty(strfind(fun,'\')) )
     [pathstr1, name, ext] = fileparts(fun);
     addpath(pathstr1);
diff --git a/matlab/utilities/doc/get_internal_doc_block.m b/matlab/utilities/doc/get_internal_doc_block.m
index 65303de..d965500 100644
--- a/matlab/utilities/doc/get_internal_doc_block.m
+++ b/matlab/utilities/doc/get_internal_doc_block.m
@@ -2,7 +2,6 @@ function block = get_internal_doc_block(fname,fpath)
 % Extract doc sections from matlab's routine.
  
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -19,6 +18,8 @@ function block = get_internal_doc_block(fname,fpath)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 % Default output
 block = [];
     
diff --git a/matlab/utilities/general/demean.m b/matlab/utilities/general/demean.m
index cfa386f..332ab10 100644
--- a/matlab/utilities/general/demean.m
+++ b/matlab/utilities/general/demean.m
@@ -28,7 +28,6 @@ function c = demean(x)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT ens DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -44,6 +43,8 @@ function c = demean(x)
 %
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
+
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
    
 if ndim(x)==1
     c = x-mean(x);
diff --git a/matlab/utilities/general/ndim.m b/matlab/utilities/general/ndim.m
index 836d217..f9e2c80 100644
--- a/matlab/utilities/general/ndim.m
+++ b/matlab/utilities/general/ndim.m
@@ -28,7 +28,6 @@ function n = ndim(x)
 %@eod:
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT ens DOT fr
 %    
 % This file is part of Dynare.
 %
@@ -45,4 +44,6 @@ function n = ndim(x)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 n = sum(size(x)>1);
\ No newline at end of file
diff --git a/matlab/utilities/tests/dynTest.m b/matlab/utilities/tests/dynTest.m
index bf59e5b..8dd2fc0 100644
--- a/matlab/utilities/tests/dynTest.m
+++ b/matlab/utilities/tests/dynTest.m
@@ -33,7 +33,6 @@ function dynTest(fun,dynare_path)
 %@eod:
 
 % Copyright (C) 2011-2012 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -50,6 +49,8 @@ function dynTest(fun,dynare_path)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 original_directory = pwd();
 
 [pathstr1, name1, ext1] = fileparts(fun);
diff --git a/matlab/utilities/tests/dyn_assert.m b/matlab/utilities/tests/dyn_assert.m
index 7dd60e5..c6b0170 100644
--- a/matlab/utilities/tests/dyn_assert.m
+++ b/matlab/utilities/tests/dyn_assert.m
@@ -2,7 +2,6 @@ function t = dyn_assert(A,B,tol)
 % This function tests the equality of two objects.
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -19,6 +18,8 @@ function t = dyn_assert(A,B,tol)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 if ( (nargin<3) || isempty(tol) )
     use_isequal_matlab_builtin = 1;
 else
diff --git a/matlab/utilities/tests/mtest.m b/matlab/utilities/tests/mtest.m
index 1ff44e2..1354dea 100644
--- a/matlab/utilities/tests/mtest.m
+++ b/matlab/utilities/tests/mtest.m
@@ -2,7 +2,6 @@ function check = mtest(fname,fpath)
 % Extract test sections from matlab's routine executes the test and report errors.
 
 % Copyright (C) 2011 Dynare Team
-% stephane DOT adjemian AT univ DASH lemans DOT fr
 %
 % This file is part of Dynare.
 %
@@ -19,6 +18,8 @@ function check = mtest(fname,fpath)
 % You should have received a copy of the GNU General Public License
 % along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
+% Original author: stephane DOT adjemian AT univ DASH lemans DOT fr
+
 % Default answer (no problem).
 check = 1;
 
diff --git a/mex/build/bytecode.am b/mex/build/bytecode.am
old mode 100755
new mode 100644
diff --git a/mex/build/dynare_simul_.am b/mex/build/dynare_simul_.am
old mode 100755
new mode 100644
diff --git a/mex/build/gensylv.am b/mex/build/gensylv.am
old mode 100755
new mode 100644
diff --git a/mex/build/k_order_perturbation.am b/mex/build/k_order_perturbation.am
old mode 100755
new mode 100644
diff --git a/mex/build/kalman_steady_state.am b/mex/build/kalman_steady_state.am
old mode 100755
new mode 100644
diff --git a/mex/build/libdynare++.am b/mex/build/libdynare++.am
old mode 100755
new mode 100644
diff --git a/mex/build/matlab/configure b/mex/build/matlab/configure
index 7d39e5a..aee2b6b 100755
--- a/mex/build/matlab/configure
+++ b/mex/build/matlab/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dynare 4.3.1.
+# Generated by GNU Autoconf 2.69 for dynare 4.3.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dynare'
 PACKAGE_TARNAME='dynare'
-PACKAGE_VERSION='4.3.1'
-PACKAGE_STRING='dynare 4.3.1'
+PACKAGE_VERSION='4.3.2'
+PACKAGE_STRING='dynare 4.3.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1328,7 +1328,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dynare 4.3.1 to adapt to many kinds of systems.
+\`configure' configures dynare 4.3.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1398,7 +1398,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dynare 4.3.1:";;
+     short | recursive ) echo "Configuration of dynare 4.3.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1510,7 +1510,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dynare configure 4.3.1
+dynare configure 4.3.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2008,7 +2008,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dynare $as_me 4.3.1, which was
+It was created by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2824,7 +2824,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dynare'
- VERSION='4.3.1'
+ VERSION='4.3.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -8483,7 +8483,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dynare $as_me 4.3.1, which was
+This file was extended by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -8540,7 +8540,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dynare config.status 4.3.1
+dynare config.status 4.3.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac
old mode 100755
new mode 100644
index cae3c92..dab4784
--- a/mex/build/matlab/configure.ac
+++ b/mex/build/matlab/configure.ac
@@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ([2.61])
-AC_INIT([dynare], [4.3.1])
+AC_INIT([dynare], [4.3.2])
 AC_CONFIG_SRCDIR([configure.ac])
 AM_INIT_AUTOMAKE([-Wall -Wno-portability -Werror foreign])
 
diff --git a/mex/build/matlab/mex.am b/mex/build/matlab/mex.am
old mode 100755
new mode 100644
diff --git a/mex/build/ms_sbvar.am b/mex/build/ms_sbvar.am
old mode 100755
new mode 100644
diff --git a/mex/build/octave/configure b/mex/build/octave/configure
index d326af0..0d438bd 100755
--- a/mex/build/octave/configure
+++ b/mex/build/octave/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dynare 4.3.1.
+# Generated by GNU Autoconf 2.69 for dynare 4.3.2.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -577,8 +577,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='dynare'
 PACKAGE_TARNAME='dynare'
-PACKAGE_VERSION='4.3.1'
-PACKAGE_STRING='dynare 4.3.1'
+PACKAGE_VERSION='4.3.2'
+PACKAGE_STRING='dynare 4.3.2'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -1318,7 +1318,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dynare 4.3.1 to adapt to many kinds of systems.
+\`configure' configures dynare 4.3.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1388,7 +1388,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dynare 4.3.1:";;
+     short | recursive ) echo "Configuration of dynare 4.3.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1497,7 +1497,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dynare configure 4.3.1
+dynare configure 4.3.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1995,7 +1995,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dynare $as_me 4.3.1, which was
+It was created by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2811,7 +2811,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='dynare'
- VERSION='4.3.1'
+ VERSION='4.3.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -6243,6 +6243,53 @@ fi
   CPPFLAGS="$CPPFLAGS_MATIO $CPPFLAGS"
   LDFLAGS="$LDFLAGS_MATIO $LDFLAGS"
 
+      LIBS=""
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
+$as_echo_n "checking for compress in -lz... " >&6; }
+if ${ac_cv_lib_z_compress+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char compress ();
+int
+main ()
+{
+return compress ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_z_compress=yes
+else
+  ac_cv_lib_z_compress=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
+$as_echo "$ac_cv_lib_z_compress" >&6; }
+if test "x$ac_cv_lib_z_compress" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+fi
+
+
   ac_fn_c_check_header_mongrel "$LINENO" "matio.h" "ac_cv_header_matio_h" "$ac_includes_default"
 if test "x$ac_cv_header_matio_h" = xyes; then :
 
@@ -6288,7 +6335,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_matio_Mat_Open" >&5
 $as_echo "$ac_cv_lib_matio_Mat_Open" >&6; }
 if test "x$ac_cv_lib_matio_Mat_Open" = xyes; then :
-  LIBADD_MATIO="-lmatio"
+  LIBADD_MATIO="-lmatio $LIBS"
 else
   has_matio=no
 fi
@@ -7905,7 +7952,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dynare $as_me 4.3.1, which was
+This file was extended by dynare $as_me 4.3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7962,7 +8009,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dynare config.status 4.3.1
+dynare config.status 4.3.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/mex/build/octave/configure.ac b/mex/build/octave/configure.ac
index c7fa595..13d3b12 100755
--- a/mex/build/octave/configure.ac
+++ b/mex/build/octave/configure.ac
@@ -18,7 +18,7 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ([2.61])
-AC_INIT([dynare], [4.3.1])
+AC_INIT([dynare], [4.3.2])
 AC_CONFIG_SRCDIR([configure.ac])
 AM_INIT_AUTOMAKE([-Wall -Wno-portability -Werror foreign])
 
diff --git a/mex/build/octave/mex.am b/mex/build/octave/mex.am
old mode 100755
new mode 100644
diff --git a/mex/sources/bytecode/SparseMatrix.cc b/mex/sources/bytecode/SparseMatrix.cc
index d7c4ab4..c987060 100644
--- a/mex/sources/bytecode/SparseMatrix.cc
+++ b/mex/sources/bytecode/SparseMatrix.cc
@@ -2910,7 +2910,14 @@ SparseMatrix::Solve_ByteCode_Symbolic_Sparse_GaussianElimination(int Size, bool
         }
       if (symbolic)
         {
-          if (record && (nop == nop1))
+          if (t > int(periods*0.35))
+            {
+              symbolic = false;
+              mxFree(save_opaa);
+              mxFree(save_opa);
+              mxFree(save_op);
+            }
+          else if (record && (nop == nop1))
             {
               if (save_opa && save_opaa)
                 {
diff --git a/osx/createOsxFolderForPkg.sh b/osx/createOsxFolderForPkg.sh
index cf2f9e0..da91860 100755
--- a/osx/createOsxFolderForPkg.sh
+++ b/osx/createOsxFolderForPkg.sh
@@ -29,7 +29,7 @@ mkdir -p "$INSTALLDIR/contrib/ms-sbvar/TZcode"
 mkdir -p "$INSTALLDIR/mex/octave"
 mkdir -p "$INSTALLDIR/mex/matlab/osx64"
 mkdir "$INSTALLDIR/mex/matlab/osx32-7.4"
-mkdir "$INSTALLDIR/mex/matlab/osx32-7.5-7.14"
+mkdir "$INSTALLDIR/mex/matlab/osx32-7.5-8.0"
 
 
 # top level
@@ -47,7 +47,7 @@ cp -r $TOP_DYN_DIR/examples                                      $INSTALLDIR
 ##########################################################
 # FIRST BUILD 32 BIT EVERYTHING, 32 BIT MATLAB < 7.5 MEX #
 ##########################################################
-./configure CFLAGS='-arch i386' CXXFLAGS='-arch i386' FFLAGS='-arch i386' LDFLAGS='-arch i386' --with-matlab=/Applications/MATLAB/R2007a MATLAB_VERSION=7.4 --with-gsl=/usr/local32 --with-slicot=/usr/local32 --with-matio=/usr/local32
+./configure FFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' CPPFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' LDFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' --with-matlab=/Applications/MATLAB/R2007a MATLAB_VERSION=7.4 --with-gsl=/usr/local32 --with-slicot=/usr/local32 --with-matio=/usr/local32
 make pdf
 make
 
@@ -118,21 +118,21 @@ cp $TOP_DYN_DIR/dynare++/kord/kord.pdf
 ##############################################
 make clean
 cd $TOP_DYN_DIR/mex/build/matlab
-./configure CFLAGS='-arch i386' CXXFLAGS='-arch i386' FFLAGS='-arch i386' LDFLAGS='-arch i386' --with-matlab=/Applications/MATLAB/MATLAB_R2009b_32bit/MATLAB_R2009b.app MATLAB_VERSION=7.9 MEXEXT='mexmaci' --with-gsl=/usr/local32 --with-slicot=/usr/local32 --with-matio=/usr/local32
+./configure FFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' CPPFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' LDFLAGS='-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -arch i386' --with-matlab=/Applications/MATLAB/MATLAB_R2009b_32bit/MATLAB_R2009b.app MATLAB_VERSION=7.9 MEXEXT='mexmaci' --with-gsl=/usr/local32 --with-slicot=/usr/local32 --with-matio=/usr/local32
 make
 
 # Matlab
-cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci                      $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci                                 $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci                            $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci                                  $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci                     $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci                      $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci                                $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/local_state_space_iterations/*.mexmaci             $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci                                  $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci                                 $INSTALLDIR/mex/matlab/osx32-7.5-7.14
-cp $TOP_DYN_DIR/mex/build/matlab/sobol/*.mexmaci                                    $INSTALLDIR/mex/matlab/osx32-7.5-7.14
+cp $TOP_DYN_DIR/mex/build/matlab/block_kalman_filter/*.mexmaci                      $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/bytecode/*.mexmaci                                 $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/dynare_simul_/*.mexmaci                            $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/gensylv/*.mexmaci                                  $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/k_order_perturbation/*.mexmaci                     $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/kalman_steady_state/*.mexmaci                      $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/kronecker/*.mexmaci                                $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/local_state_space_iterations/*.mexmaci             $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/mjdgges/*.mexmaci                                  $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/ms_sbvar/*.mexmaci                                 $INSTALLDIR/mex/matlab/osx32-7.5-8.0
+cp $TOP_DYN_DIR/mex/build/matlab/sobol/*.mexmaci                                    $INSTALLDIR/mex/matlab/osx32-7.5-8.0
 
 
 #####################################
diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index a3b260f..5f80984 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -59,7 +59,7 @@ void
 CheckStatement::writeOutput(ostream &output, const string &basename) const
 {
   options_list.writeOutput(output);
-  output << "check(M_,options_,oo_);\n";
+  output << "oo_.dr.eigval = check(M_,options_,oo_);" << endl;
 }
 
 void
diff --git a/preprocessor/ExprNode.cc b/preprocessor/ExprNode.cc
index 66bef75..19f79bd 100644
--- a/preprocessor/ExprNode.cc
+++ b/preprocessor/ExprNode.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Dynare Team
+ * Copyright (C) 2007-2013 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -1322,7 +1322,7 @@ UnaryOpNode::prepareForDerivation()
 expr_t
 UnaryOpNode::composeDerivatives(expr_t darg, int deriv_id)
 {
-  expr_t t11, t12, t13;
+  expr_t t11, t12, t13, t14;
 
   switch (op_code)
     {
@@ -1442,7 +1442,9 @@ UnaryOpNode::composeDerivatives(expr_t darg, int deriv_id)
       // sqrt(pi)*exp(x^2)
       t13 = datatree.AddTimes(t11, t12);
       // 2/(sqrt(pi)*exp(x^2));
-      return datatree.AddDivide(datatree.Two, t13);
+      t14 = datatree.AddDivide(datatree.Two, t13);
+      // (2/(sqrt(pi)*exp(x^2)))*dx;
+      return datatree.AddTimes(t14, darg);
     }
   // Suppress GCC warning
   exit(EXIT_FAILURE);
@@ -5171,7 +5173,7 @@ SecondDerivExternalFunctionNode::computeTemporaryTerms(map<expr_t, int> &referen
 expr_t
 SecondDerivExternalFunctionNode::computeDerivative(int deriv_id)
 {
-  cerr << "ERROR: SecondDerivExternalFunctionNode::computeDerivative(). Not implemented" << endl;
+  cerr << "ERROR: third order derivatives of external functions are not implemented" << endl;
   exit(EXIT_FAILURE);
 }
 
diff --git a/preprocessor/ModFile.cc b/preprocessor/ModFile.cc
index 3f6b4a4..f15ee96 100644
--- a/preprocessor/ModFile.cc
+++ b/preprocessor/ModFile.cc
@@ -161,6 +161,13 @@ ModFile::checkPass()
       exit(EXIT_FAILURE);
     }
 
+  if ((block || byte_code) && stochastic_statement_present
+      && mod_file_struct.order_option >= 2)
+    {
+      cerr << "ERROR: In 'model' block, 'block' and/or 'bytecode' options are not yet compatible with a stochastic model at order >= 2" << endl;
+      exit(EXIT_FAILURE);
+    }
+
   if (use_dll && (block || byte_code))
     {
       cerr << "ERROR: In 'model' block, 'use_dll' option is not compatible with 'block' or 'bytecode'" << endl;

-- 
Debian packaging for dynare



More information about the Pkg-octave-commit mailing list