Dynare的下载、安装和使用

Quick Start

For those who want to quickly have something running, this page explains how to setup Dynare on Windows and to run your first model file.
To run Dynare, you have the choice between running it inside GNU Octave (free software) or MathWorks MATLAB (proprietary).

Using Dynare with MATLAB on Windows

  1. Make sure that MATLAB is installed on your computer.
  2. Download the latest Dynare Windows installer at the Download page.
  3. Double-click on the Dynare installer and follow the instructions.
  4. Run MATLAB by locating it in the Windows start menu and by clicking on its icon.
  5. Configure MATLAB for Dynare. See the section below.
  6. Run a Dynare example in MATLAB. See the section below.

Using Dynare with Octave on Windows

  1. Download the Octave installer at the Octave download page.
  2. Double-click on the Octave installer and follow the instructions.
  3. Download the latest Dynare Windows installer at the Download page.
  4. Double-click on the Dynare installer and follow the instructions.
  5. Run Octave by locating it in the Windows start menu or on the desktop and by clicking on its icon.
  6. Configure Octave for Dynare. See the section below.
  7. Run a Dynare example in Octave. See the section below.

Configuring MATLAB for Dynare

You once again have two choices. You can either use the command window or the menu entries.

1. Configuring MATLAB using the Command Window

You will have to do this every time you start MATLAB, as MATLAB will not remember the setting.

  • Click on the "Command Window".
  • Type the following, replacing 4.x.y with your Dynare version.
addpath c:\dynare\4.x.y\matlab

For example, for Dynare 4.3.0 type:

addpath c:\dynare\4.3.0\matlab

If you have installed Dynare in a non-standard directory, adjust the path accordingly.

2. Configuring MATLAB using the menu entries

You will only have to do this once as MATLAB will remember the setting next time you run it.

  • Click on the MATLAB "File" menu.
  • Click on the "Set Path" menu entry
  • Click on the "Add Folder..." button. This will open a file dialog.
  • Select the "matlab" subdirectory of you Dynare installation. For example, if you have installed Dynare 4.3.0 in the standard location, select:
    c:\dynare\4.3.0\matlab
  • Click "Ok" to close the file dialog. 
  • Apply the setting by clicking "Save" button.

Configuring Octave for Dynare

At the Octave command prompt, type the following, replacing 4.x.y with your Dynare version.
addpath c:\dynare\4.x.y\matlab

For example, for Dynare 4.3.0 type:

addpath c:\dynare\4.3.0\matlab
If you don't want to type this command every time you run Octave, you can put it in a file called ".octaverc" in your home directory. This file will usually be called "c:\Documents and Settings\USERNAME\.octaverc" on Windows XP and "c:\Users\USERNAME\.octaverc" on Windows Vista/7.

Running and editing a Dynare example

  • Create a working directory that will hold your Dynare models. For example, "c:\dynare\work".
  • Assuming that you are using Dynare 4.3.0, copy the example model file "c:\dynare\4.3.0\examples\example1.mod" to your working directory.
  • Run either MATLAB or Octave.
  • At command prompt, type the following to change the working directory:
cd c:\dynare\work
  • Then type the following to run the example model file:
dynare example1
  • You can edit the example by typing:

edit example1.mod

来自:http://www.dynare.org/documentation-and-support/quick-start

  • 4
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值