Page 1 of 1
I am a new Dynare user
Posted:
Mon Aug 06, 2007 1:55 am
by ambudon
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.
Posted:
Mon Aug 06, 2007 2:19 am
by MichelJuillard
Please look at the online manual. See in particular
[url]
http://www.dynare.org/manual/ *
[/url]
M.
NB: * new url
I am a new Dynare user (Solution does not work)
Posted:
Mon Aug 06, 2007 4:36 am
by ambudon
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,
Posted:
Mon Aug 06, 2007 5:07 am
by horvathar
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.)
I am a new Dynare user (Solution does not work)
Posted:
Mon Aug 06, 2007 5:56 am
by ambudon
nop, i tried both of them..
same message...
Posted:
Mon Aug 06, 2007 8:28 am
by horvathar
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.
I am a new Dynare user
Posted:
Mon Aug 06, 2007 6:13 pm
by ambudon
Yes, i have done that as well...
Posted:
Tue Aug 07, 2007 8:59 am
by MichelJuillard
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
I am a new Dynare user (Solution does not work)
Posted:
Tue Aug 07, 2007 2:29 pm
by ambudon
yes, once i installed dynare in C, it worked.
sorry for the trouble.