I am a new Dynare user

Hi All,

I am using Matlab 7.1 and have some issues with running the example files. Can you please help me out ?

I have downloaded the example files and stored them in Matlab. The path is :

C:\Program Files\MATLAB71\work\dynare_v3\example

Matlab can not run the files with extension “.mod”. It gives the message undefined variable " " or class " " .

Hence, I created a “.m” file (filename is neogrowth.m by typing what is given in “Practising Dynare” and saved it and tried to run it. But it does not work. It gives the following message:

??? Error: File: negrowth.m Line: 19 Column: 38
The expression to the left of the equals sign is not a valid target for an assignment.

Do you have any idea whats going wrong ?

How did you run these example files ?

Thanks in advance.

Please look at the online manual. See in particular
dynare.org/manual/ *


NB: * new url

Thanks a lot for the suggestion.

But that does not work. Let me explain.

I have installed dynare_v3 in the ‘work’ folder in Matlab. Hence the path is

C:\Program Files\MATLAB71\work\dynare_v3

In dynare_v3, there are sub-folders containing the .mod files.

Suppose I want to implement example1.mod file, which is in ‘examples’ sub- folder.

I make C:\Program Files\MATLAB71\work\dynare_v3\examples my current directory. Since I am in the current directory, I need not specify the whole path.
Then I type dynare example1 or dynare example1.mod.

It gives me following message:

dynare example1
??? Error using ==> dynare
’C:\Program’ is not recognized as an internal or external command,
operable program or batch file.

I have seen this question in the forum. but i think, the solution is not applicable in this case.

Whats going wrong ?


Let’s try:
dynare example1.mod

So you have to add .mod at the end of the file name. (It’s clearly in the manual, as Michel answered you, you’re eyes somehow skipped it.)

nop, i tried both of them…

same message…

Have you done the “set path” thing?
It’s in the manual too. It’s OK that you set the current directory for “examples”, but additionally you have to add the dynare_v3/matlab path in the file/set path menu.
If you have already done this, I’ve no other ideas.

Yes, i have done that as well… :cry:

The problem is with the space in the directory name. There is a reason why we suggested to install Dynare directly under c: …

It is possible to protect agains spaces in directory name by modifying dynare.m on line 15.

  command = [command ' ' varargin{i-1}];


  command = '"' command '" ' varargin{i-1}];

'"' is a double quote inside simple quotes

'" ' is a double quote and a space inside simple quotes



yes, once i installed dynare in C, it worked.

sorry for the trouble.