how to run a '.mod' file?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

how to run a '.mod' file?

Postby zahra2309 » Sat Feb 23, 2013 11:11 am

I use dynare 4.2.2 .
I create .m file then i write my script and then i save the m file as .mod file. but the run button is not active! so how can i run this file?
in addition after saving the .m file as .mod file the codes like end , global,... are not active(blue)!
please help me!
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: how to run a '.mod' file?

Postby jpfeifer » Sat Feb 23, 2013 1:57 pm

Set a path in Matlab to the dynare\matlab subfolder. Set the Matlab Active Path to the folder where your mod-file is stored. Then type into the Matlab command window:
Code: Select all
dynare name_of_the_mode_file

See also Chapter 3 of the Dynare manual.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: how to run a '.mod' file?

Postby zahra2309 » Sun Mar 03, 2013 7:01 am

Hi
Thank you.I did all of this but it didnot work and I could not run the file!
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: how to run a '.mod' file?

Postby SébastienVillemot » Fri Mar 08, 2013 1:57 pm

What is the error message?
Sébastien Villemot
Economist at OFCE – Sciences Po
SébastienVillemot
 
Posts: 706
Joined: Fri Dec 07, 2007 2:29 pm
Location: Paris, France

Re: how to run a '.mod' file?

Postby zahra2309 » Mon Mar 11, 2013 7:48 am

when I type this command:
Dynare myfile.mod
Matlab showes this error:
Error using==> dynare at 96
DYNARE: can't open my.mod
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: how to run a '.mod' file?

Postby jpfeifer » Mon Mar 11, 2013 8:13 am

This means that Dynare cannot find you mod-file. Make sure that the mod-file you saved is in the curent Matlab-Path.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: how to run a '.mod' file?

Postby zahra2309 » Wed Mar 13, 2013 9:29 am

yes, I know this so I change my directory several times, but it does not work!
Inaddition when I open a .mod file directly without any command, Matlab shows that mentioned error massage too!
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: how to run a '.mod' file?

Postby zahra2309 » Mon May 27, 2013 10:41 am

zahra2309 wrote:yes, I know this so I change my directory several times, but it does not work!
Inaddition when I open a .mod file directly without any command, Matlab shows that mentioned error massage too!


I found the problem finally!
any way, I appreciate all your help!
zahra2309
 
Posts: 22
Joined: Sat Feb 23, 2013 10:54 am

Re: how to run a '.mod' file?

Postby lelos » Thu Feb 25, 2016 8:52 pm

Hi, Could you please post the solution to your problem ??

Cause it seems I have the same problem. Although I add the folder and the subforlder of my .mod file in my path, and of course the dynare\matlab folder, matlab cannot open the mod file.:

Starting Dynare (version 4.4.3).
Starting preprocessing of the model file ...
ERROR: Could not open file: DSGE_1.mod

I desperately dont know how to fix that. It seems very stupid since I am wasting time doing the same thing and reading the manual's instruction 1000000 times.

Any idea please??
Thank you
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am

Re: how to run a '.mod' file?

Postby lelos » Thu Feb 25, 2016 9:12 pm

Issue just resolved.

For those who may face the same problem in the future, when you want to add your .mod file in Matlab's current folder, do not right-click and press "Add folder and subfolder" !! Just double left click on the folder of your .mod file. Thats how it worked for me.
lelos
 
Posts: 35
Joined: Thu Feb 18, 2016 11:15 am


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 16 guests