I have 12 pound lines at the top of a model section, and 70 variables/equations. The _static.m file initializes g1 matrix as 70x70, but starts writing at only 13th line, and references 82nd line. This produces a Matlab error.

It seems, that the number of pound lines is not subtracted from an equation index when writing g1 matrix. Forming residual is correct.

I believe that the bug with the pound sign (#) instructions is now corrected. It is checked in SVN and should be available in tomorrow snapshot for version 4.

This is a (log-)linearized version of the Ireland model. It works fine in Dynare 3 but the pound lines cause problems in Dynare 4.

On my PC the nonlinear test files ireland.mod and ireland1.mod included in the SVN versions of Dynare 3 and 4 do not work because Dynare is unable to solve for the steady state (convergence problems).

I have downloaded the latest version. Yet, the problems are the same. I still get the error messages I copied into my first message when I run ireland_loglin.mod.

Also the nonlinear example files still do not work, again because of convergence problems in the calculation of the steady state.

I am not sure I understand your last question. I would guess I am using matlab\dynare_m.exe.

The error message that you indicated means that the parser that makes *.m files from your *.mod files fails to execute. This program is matlab/dynare_m.exe

Are you updating via SVN (using cygwin or Tortoise) or are you downloading the snapshot for Dynare v4?
If it is the later, my last changes will only be available tomorrow.

I am unable to reproduce the problem that you are encountering. Please, do the following in Matlab:

which dynare

does the answer points correctly to the latest version that you downloaded?
does dynare_m.exe is dated November 7 and has 1 081 825 bytes?

I installed SVN revision 1048 and now ireland_loglin.mod works fine with the pound lines, while with yesterday’s snapshot version it did not work.

One last question:
Do the test files ireland.mod and ireland1.mod included in the dynare folders …\tests\pi2004 work fine on your PC? On mine, regardless of the dynare 4 version I use, I get the following error message:

**SOLVE: maxit has been reached
??? Error using ==> steady_
STEADY: convergence problems

Error in ==> steady at 13
steady_;

Error in ==> ireland1 at 189
steady;

Error in ==> dynare at 49
evalin(‘base’,fname) ;**

I am working on a log-linearized model where steady-state values of the endogenous variables show up in the model declaration step. My model is such that some of these steady-state values need to be solved using a numerical solver.

It appears that Dynare 4 does not like functions beyond the standard addition, subtraction, log, square root, etc., so calling a function I wrote to compute the steady-state values is out of question. For instance, add

blah = max([1,3,5]);

to your model step you would see that Dynare does not like it.

Has anyone here experienced the same or a similar issue? Any suggestion or ideas on how to get around this would be greatly appreciated!

In Dynare v4, the set of authorized functions inside the model block is limited to standard functions (arithmetic operators, sqrt, log, exp, trigonometry…). This is due to the fact that in Dynare v4 we compute analytical derivatives of the model, while in Dynare v3 we were only computing numerical derivatives. Therefore, we need to know the analytical derivative of any function used in the model block.

In future releases of Dynare, we will introduce the possibility of using arbitrary functions in the model block by allowing the user to provide its first (and possibly second) derivatives.

Also note that there already exist a “max” function, but which only accepts two arguments. In your case you could write: