# I am a new Dynare user

**URL:** <https://forum.dynare.org/t/i-am-a-new-dynare-user/410>\
**Category:** Dynare help (legacy posts)\
**Created:** [6 August 2007 01:55 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410 "2007-08-06T01:55:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ambudon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@ambudon](https://forum.dynare.org/u/ambudon)\
**Post date:** [6 August 2007 01:55 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/1 "2007-08-06T01:55:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [6 August 2007 02:19 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/2 "2007-08-06T02:19:21Z")

</div>

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

M.

NB: \* new url

---

<div class="post-metadata">

**Author:** ![ambudon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@ambudon](https://forum.dynare.org/u/ambudon)\
**Post date:** [6 August 2007 04:36 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/3 "2007-08-06T04:36:26Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![horvathar](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/71c47a/32.png) [@horvathar](https://forum.dynare.org/u/horvathar)\
**Post date:** [6 August 2007 05:07 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/4 "2007-08-06T05:07:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ambudon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@ambudon](https://forum.dynare.org/u/ambudon)\
**Post date:** [6 August 2007 05:56 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/5 "2007-08-06T05:56:22Z")

</div>

nop, i tried both of them…

same message…

---

<div class="post-metadata">

**Author:** ![horvathar](https://forum.dynare.org/letter_avatar_proxy/v4/letter/h/71c47a/32.png) [@horvathar](https://forum.dynare.org/u/horvathar)\
**Post date:** [6 August 2007 08:28 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/6 "2007-08-06T08:28:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ambudon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@ambudon](https://forum.dynare.org/u/ambudon)\
**Post date:** [6 August 2007 18:13 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/7 "2007-08-06T18:13:41Z")

</div>

Yes, i have done that as well… 😢

---

<div class="post-metadata">

**Author:** ![MichelJuillard](https://forum.dynare.org/user_avatar/forum.dynare.org/micheljuillard/32/5318_2.png) [@MichelJuillard](https://forum.dynare.org/u/MichelJuillard)\
**Post date:** [7 August 2007 08:59 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/8 "2007-08-07T08:59:32Z")

</div>

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

```auto
  command = [command ' ' varargin{i-1}];
```

by

```auto
  command = '"' command '" ' varargin{i-1}];
```

`'"'` is a double quote inside simple quotes

`'" '` is a double quote and a space inside simple quotes

Best

Michel

---

<div class="post-metadata">

**Author:** ![ambudon](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/ad7895/32.png) [@ambudon](https://forum.dynare.org/u/ambudon)\
**Post date:** [7 August 2007 14:29 UTC](https://forum.dynare.org/t/i-am-a-new-dynare-user/410/9 "2007-08-07T14:29:30Z")

</div>

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

sorry for the trouble.
