4. Configuration

4.1. For Matlab®

You need to add the matlab subdirectory of your Dynare installation to Matlab® path. You have two options for doing that:

  • Using the addpath command in the Matlab® command window:

    Under Windows®, assuming that you have installed Dynare at the standard location, and replacing "4.x.y" by correct version number, type:

      addpath c:\dynare\4.x.y\matlab
      

    Under Debian GNU/Linux or Ubuntu, type:

       addpath /usr/share/dynare/matlab
      

    Matlab® will not remember this setting next time you run it, and you will have to do it again.

  • Via the menu entries:

    Select the "Set Path" entry in the "File" menu, then click on "Add Folder...", and select the matlab subdirectory of your Dynare installation. Note that you should not use "Add with Subfolders...". Apply the settings by clicking on "Save". Note that Matlab will remember this setting next time you run it.

4.2. For GNU Octave

You need to add the matlab subdirectory of your Dynare installation to Octave path, using the addpath at the Octave command prompt.

Under Windows®, assuming that you have installed Dynare at the standard location, and replacing "4.x.y" by correct version number, type:

  addpath c:\dynare\4.x.y\matlab

Under Debian GNU/Linux or Ubuntu, there is no need to use addpath; the packaging does it for you.

You will also want to tell to Octave to accept the short syntax (without parentheses and quotes) for the dynare command, by typing:

  mark_as_command dynare

If you don't want to type these two commands every time you run Octave, you can put them in a file called .octaverc in your home directory (under Windows® this will generally by c:\Documents and Settings\USERNAME\). This file is run by Octave at every startup.

4.3. Some words of warning

You should be very careful about the content of you Matlab® or Octave path. You can display its content by simply typing path in the command window.

The path should normally contain system directories of Matlab® or Octave, and the matlab subdirectory of your Dynare installation. It should not contain any other Dynare-related directory, from another Dynare version of from the version you are using. However, note that Dynare will automatically add one (and only one) of the mex/2007a, mex/2007b, and mex/octave subdirectories, depending on your installation.

You have to be aware that adding other directories to your path can potentially create problems, if some of your M-files have the same names than Dynare files. Your files would then override Dynare files, and make Dynare unusable.