I am a new Dynare user

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.

I am a new Dynare user

Postby ambudon » Mon Aug 06, 2007 1:55 am

Hi All,

I am using Matlab 7.1 and have some issues with running the example files. Can you please help me out ?

I have downloaded the example files and stored them in Matlab. The path is :

C:\Program Files\MATLAB71\work\dynare_v3\example

Matlab can not run the files with extension ".mod". It gives the message undefined variable " " or class " " .

Hence, I created a ".m" file (filename is neogrowth.m by typing what is given in "Practising Dynare" and saved it and tried to run it. But it does not work. It gives the following message:

??? Error: File: negrowth.m Line: 19 Column: 38
The expression to the left of the equals sign is not a valid target for an assignment.

Do you have any idea whats going wrong ?

How did you run these example files ?

Thanks in advance.
ambudon
 
Posts: 5
Joined: Mon Aug 06, 2007 1:34 am

Postby MichelJuillard » Mon Aug 06, 2007 2:19 am

Please look at the online manual. See in particular
[url]
http://www.dynare.org/manual/ *
[/url]

M.

NB: * new url
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

I am a new Dynare user (Solution does not work)

Postby ambudon » Mon Aug 06, 2007 4:36 am

Thanks a lot for the suggestion.

But that does not work. Let me explain.

I have installed dynare_v3 in the 'work' folder in Matlab. Hence the path is

C:\Program Files\MATLAB71\work\dynare_v3

In dynare_v3, there are sub-folders containing the .mod files.

Suppose I want to implement example1.mod file, which is in 'examples' sub- folder.

I make C:\Program Files\MATLAB71\work\dynare_v3\examples my current directory. Since I am in the current directory, I need not specify the whole path.
Then I type dynare example1 or dynare example1.mod.

It gives me following message:

dynare example1
??? Error using ==> dynare
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

I have seen this question in the forum. but i think, the solution is not applicable in this case.

Whats going wrong ?

Thanks,
ambudon
 
Posts: 5
Joined: Mon Aug 06, 2007 1:34 am

Postby horvathar » Mon Aug 06, 2007 5:07 am

Let's try:
dynare example1.mod

So you have to add .mod at the end of the file name. (It's clearly in the manual, as Michel answered you, you're eyes somehow skipped it.)
horvathar
 
Posts: 5
Joined: Sun Aug 05, 2007 2:58 pm
Location: Budapest

I am a new Dynare user (Solution does not work)

Postby ambudon » Mon Aug 06, 2007 5:56 am

nop, i tried both of them..

same message...
ambudon
 
Posts: 5
Joined: Mon Aug 06, 2007 1:34 am

Postby horvathar » Mon Aug 06, 2007 8:28 am

Have you done the "set path" thing?
It's in the manual too. It's OK that you set the current directory for "examples", but additionally you have to add the dynare_v3/matlab path in the file/set path menu.
If you have already done this, I've no other ideas.
horvathar
 
Posts: 5
Joined: Sun Aug 05, 2007 2:58 pm
Location: Budapest

I am a new Dynare user

Postby ambudon » Mon Aug 06, 2007 6:13 pm

Yes, i have done that as well... :cry:
ambudon
 
Posts: 5
Joined: Mon Aug 06, 2007 1:34 am

Postby MichelJuillard » Tue Aug 07, 2007 8:59 am

The problem is with the space in the directory name. There is a reason why we suggested to install Dynare directly under c: ...

It is possible to protect agains spaces in directory name by modifying dynare.m on line 15.
Replace
Code: Select all
  command = [command ' ' varargin{i-1}];

by
Code: Select all
  command = ['"' command '" ' varargin{i-1}];

Code: Select all
'"'
is a double quote inside simple quotes
Code: Select all
'" '
is a double quote and a space inside simple quotes

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

I am a new Dynare user (Solution does not work)

Postby ambudon » Tue Aug 07, 2007 2:29 pm

yes, once i installed dynare in C, it worked.

sorry for the trouble.
ambudon
 
Posts: 5
Joined: Mon Aug 06, 2007 1:34 am


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 8 guests