# How to solve this problem:DYNARE: can't open exapmle1.mod

**URL:** <https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743>\
**Category:** Dynare help (legacy posts)\
**Created:** [25 September 2012 12:23 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743 "2012-09-25T12:23:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![wanghao19820707](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/a183cd/32.png) [@wanghao19820707](https://forum.dynare.org/u/wanghao19820707)\
**Post date:** [25 September 2012 12:23 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/1 "2012-09-25T12:23:24Z")

</div>

Dear All:  
I install dynare 4.3.0 and matlab 7.10.0(R2010a) on my win7 system.And I already use addpath command to add directory of matlab and examples of Dynare in matlab.But still, when I use command “dynare example1” the error message shows as following:

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Local state space iteration (second order).  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.  
[mex] Quasi Monte-Carlo sequence (Sobol).

??? Error using ==\> dynare at 96  
DYNARE: can’t open exapmle1.mod

what can I do ?

---

<div class="post-metadata">

**Author:** ![kyri82](https://forum.dynare.org/letter_avatar_proxy/v4/letter/k/ee7513/32.png) [@kyri82](https://forum.dynare.org/u/kyri82)\
**Post date:** [25 September 2012 12:26 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/2 "2012-09-25T12:26:01Z")

</div>

Are you sure you spelled it correctly? The message is DYNARE: can’t open exapmle1.mod and not example1.mod

---

<div class="post-metadata">

**Author:** ![wanghao19820707](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/a183cd/32.png) [@wanghao19820707](https://forum.dynare.org/u/wanghao19820707)\
**Post date:** [25 September 2012 12:56 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/3 "2012-09-25T12:56:51Z")

</div>

Hi Kyri:  
sorry for confusion.I spell right in matlab with dynare example1 but still,the error message is the same:

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Local state space iteration (second order).  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.  
[mex] Quasi Monte-Carlo sequence (Sobol).

??? Error using ==\> dynare at 96  
DYNARE: can’t open example1.mod

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [25 September 2012 13:21 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/4 "2012-09-25T13:21:06Z")

</div>

Every mod-file you want to execute has to be in Matlab’s current folder. Adding the path to the examples is not sufficient.

---

<div class="post-metadata">

**Author:** ![wanghao19820707](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/a183cd/32.png) [@wanghao19820707](https://forum.dynare.org/u/wanghao19820707)\
**Post date:** [25 September 2012 13:51 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/5 "2012-09-25T13:51:29Z")

</div>

Dear jpfeifer:  
The example1 is indeed in my current folder in matlab but still the error message is the same.  
Is it mean that maybe there is something wrong with my matlab ?  
Many thanks for your kindly help!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [25 September 2012 14:01 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/6 "2012-09-25T14:01:30Z")

</div>

Try deinstalling and then reinstalling Dynare. And do not forget deleting the path in Matlab after deinstalling.

---

<div class="post-metadata">

**Author:** ![wanghao19820707](https://forum.dynare.org/letter_avatar_proxy/v4/letter/w/a183cd/32.png) [@wanghao19820707](https://forum.dynare.org/u/wanghao19820707)\
**Post date:** [26 September 2012 09:27 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/7 "2012-09-26T09:27:33Z")

</div>

Dear Jpfeifer:  
Thanks.I will try.

---

<div class="post-metadata">

**Author:** ![chandanc](https://forum.dynare.org/letter_avatar_proxy/v4/letter/c/439d5e/32.png) [@chandanc](https://forum.dynare.org/u/chandanc)\
**Post date:** [23 September 2019 17:07 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/8 "2019-09-23T17:07:57Z")

</div>

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Local state space iteration (second order).  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.  
[mex] Quasi Monte-Carlo sequence (Sobol).  
[mex] Markov Switching SBVAR.

The file example.mod could not be located in the “Current Folder”. Check whether you typed in the correct filename  
and whether the file is really located in the “Current Folder”.

Current folder is C:\Users\ch\Documents\MATLAB\example\Output\dynare-4.5.7-win\4.5.7, and contains the following mod files:

Error using dynare (line 172)  
dynare:: can’t open example.mod  
sir i am also facing this problem to open example in dynare

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [23 September 2019 18:32 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/9 "2019-09-23T18:32:10Z")

</div>

The message is very explicit. The mod-file you are trying to execute is not located in the folder `C:\Users\ch\Documents\MATLAB\example\Output\dynare-4.5.7-win\4.5.7`

---

<div class="post-metadata">

**Author:** ![Apica](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/a88e4f/32.png) [@Apica](https://forum.dynare.org/u/Apica)\
**Post date:** [22 June 2020 19:56 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/10 "2020-06-22T19:56:20Z")

</div>

Using 64-bit preprocessor  
Starting Dynare (version 4.6.1).  
Calling Dynare with arguments: none  
ERROR: Could not open file: exp.mod

Error using fprintf  
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in dynare (line 276)  
fprintf(fid, ‘%s’, result);

somebody please help. facing this issue . … reinstalled dynare properly…even then facing this issue …

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [24 June 2020 14:56 UTC](https://forum.dynare.org/t/how-to-solve-this-problem-dynare-cant-open-exapmle1-mod/2743/11 "2020-06-24T14:56:57Z")

</div>

Is there a mod-file with that name in the current folder? Also `exp` is the name of a built-in function.
