A first-time user really needing help

Dear Dynare community:

I’m trying to be a first-time Dynare user, but unfortunately I’m being unable to run any of the sample examples. My Matlab version is 7.11.0, and my Dynare version is 4.2.4. As stated in the user guide, my first order to Matlab is

addpath /Applications/Dynare/4.2.4/matlab

Later, I try to run an example, like for instance the example1.mod attached file, by writing

dynare example1

The program indicates there is an error in line 97. Line 97 is the “error” line of the following section

d = dir(fname);
if length(d) == 0
error(‘DYNARE: can’'t open ’ fname])

As suggested in one of the previous discussions on the forum, I comment that line and go on. When I do that, I get another error in line 115. Line 115 is the “error” line of the following section:

[status, result] = system(command);
if status
% Should not use “error(result)” since message will be truncated if too long
error(‘DYNARE: preprocessing failed’)

I comment that line and go on, and then I get another error at line 121:

evalin(‘base’,fname) ;

I have no idea about how to continue trying, and considering I’m writing a DSGE model, I’m certain I would extremely benefit from using Dynare (not only now but also in a long term).

I would really appreciate your help. I promise to offer my help as many times as possible when I become a solid user.

Thanks very much,
example1.mod (1.52 KB)

Have you set your Matlab working directory to the folder where the mod-file is located? It seems Dynare can’t find the file.
Moreover, you can try adding the Dynare path to the Matlab path by going to File -> Set Path -> Add with subfolders

Thanks for your answer. I’ve done that, but still doesn’t work. Didn’t this problem happen to anyone else?

Inside Matlab type

Is the answer identical to your working directory?

The problem has been solved. Thanks so much to jpfeifer.