Page 1 of 1

Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 7:18 am
by fengsexiaxiang
Hi,everyone, I failed to run the dynare code in the matlab. Here are my problems. I stored the mod file in the desktop, and input the following commands in the command window of matlab:

>> cd C:\Users\Jacky\Desktop
>> addpath c:\Users\Jacky\Desktop
>> dynare example

However, the matlab fails to run the dynare file, and reply the following information:
??? Undefined function or method 'dynare' for input arguments of type 'char'.

I try many times to reset the path and even re-install the dynare software, but the problem still exists. The problem didn't exist in the past.

What's the potential cause for the problem? Does someone give me the suggestions to solve it? Many thanks

Re: Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 7:55 am
by Daniel Bendel
You have to input the dynare files into the matlab working enviroment.
Depending on where you have saved the dynare folder, simply run the following command in matlab:

Code: Select all
addpath c:\dynare\4.4.2\matlab

Re: Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 8:01 am
by jpfeifer
The Daniel said, the addpath() needs to go to your Dynare folder, like C:\dynare\4.4.2\matlab, not to the folder where the mod-file is located (the latter is where you have to cd to as you correctly do with the first command).

Re: Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 8:18 am
by fengsexiaxiang
Many thanks for your suggestion. And I have solve the problem under your instructions. :lol:

Re: Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 8:19 am
by fengsexiaxiang
Many thanks for your suggestion. And I have solve the problem under your instructions. :lol:

Re: Fail to run the dynare code

PostPosted: Mon Jun 02, 2014 8:21 am
by fengsexiaxiang
Thank you as well. :lol: