Fail to run the dynare code

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

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:

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).

Many thanks for your suggestion. And I have solve the problem under your instructions. :laughing:

Many thanks for your suggestion. And I have solve the problem under your instructions. :laughing:

Thank you as well. :laughing: