# Error! evalin('base',fname) ;

**URL:** <https://forum.dynare.org/t/error-evalin-base-fname/1088>\
**Category:** Dynare help (legacy posts)\
**Created:** [25 June 2009 20:26 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088 "2009-06-25T20:26:12Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![audrey64140](https://forum.dynare.org/letter_avatar_proxy/v4/letter/a/3da27b/32.png) [@audrey64140](https://forum.dynare.org/u/audrey64140)\
**Post date:** [26 May 2010 20:08 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/21 "2010-05-26T20:08:57Z")

</div>

thank you very much!

---

<div class="post-metadata">

**Author:** ![paragw](https://forum.dynare.org/user_avatar/forum.dynare.org/paragw/32/8959_2.png) [@paragw](https://forum.dynare.org/u/paragw)\
**Post date:** [9 November 2010 19:54 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/22 "2010-11-09T19:54:04Z")

</div>

Hi  
I am trying to run the attached code to solve for ramsey policy. When I run the code in MATLAB, I get the following.

> > dynare C:\dynare\4.1.3\work\leviathancomp\leviathanopt-ramsey.mod

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.

Starting Dynare (version 4.1.3).  
Starting preprocessing of the model file …  
Substitution of exo leads: added 1 auxiliary variables and equations.  
Found 5 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1
- order 2  
Computing static model derivatives:
- order 1
- order 2  
Processing outputs …done  
Preprocessing completed.  
Starting MATLAB/Octave computing.

??? Error: Unexpected MATLAB operator.

Error in ==\> dynare at 132  
evalin(‘base’,fname) ;

So I do have some computations but program stops with the above error message. Any suggestions? I am using MATLAB 7.10.0(R2010a).  
[leviathanopt-ramsey.mod](https://forum.dynare.org/uploads/default/original/1X/530313bf99a35e03788e1c3443035787a4a707ad.mod) (394 Bytes)

---

<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:** [9 November 2010 22:54 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/23 "2010-11-09T22:54:09Z")

</div>

There are many problems. For starters:  
[ul]  
_] Don’t use a hyphen “-” in the filename. It gives you the mentioned error./_:m]  
\*] The syntax is

`planner_discount=DOUBLE;
`  
which means you have to substitute a number for DOUBLE. By default, it is

`planner_discount=1;
`/\*:m]  
\*] Add

`steady;
check;
`  
after the initval block to compute the steady state from the initial values ./\*:m]  
_]Dynare cannot handle inequality constraints like the first one./_:m]  
\*] You did not specify an initial value for q.The default starting value for the steady state search is then 0.

`q^(-a-1)
`  
will give you an error as the exponent is negative and hence you would have a division by 0./\*:m][/ul]

---

<div class="post-metadata">

**Author:** ![paragw](https://forum.dynare.org/user_avatar/forum.dynare.org/paragw/32/8959_2.png) [@paragw](https://forum.dynare.org/u/paragw)\
**Post date:** [13 November 2010 18:25 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/24 "2010-11-13T18:25:40Z")

</div>

Thanks for the response. I will try making those changes and run it again.

---

<div class="post-metadata">

**Author:** ![paragw](https://forum.dynare.org/user_avatar/forum.dynare.org/paragw/32/8959_2.png) [@paragw](https://forum.dynare.org/u/paragw)\
**Post date:** [16 November 2010 20:54 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/25 "2010-11-16T20:54:13Z")

</div>

Ok. So i made the changes you suggested and I still keep on getting the following error:

> > addpath c:\dynare\4.1.3\matlab  
> > dynare C:\dynare\4.1.3\work\leviathancomp\leviathanoptramsey.mod

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.

Starting Dynare (version 4.1.3).  
Starting preprocessing of the model file …  
Substitution of exo leads: added 1 auxiliary variables and equations.  
Found 4 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1
- order 2  
Computing static model derivatives:
- order 1
- order 2  
Processing outputs …done  
Preprocessing completed.  
Starting MATLAB/Octave computing.

??? Error: Unexpected MATLAB operator.

Error in ==\> dynare at 132  
evalin(‘base’,fname) ;

I am attaching the corrected mod file. Let me know if you think of something.  
[leviathanoptramsey.mod](https://forum.dynare.org/uploads/default/original/1X/f3b02fa5c2c9721f14166bf5d6474dfacc839913.mod) (385 Bytes)

---

<div class="post-metadata">

**Author:** ![jrb](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/4da419/32.png) [@jrb](https://forum.dynare.org/u/jrb)\
**Post date:** [8 March 2011 16:42 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/26 "2011-03-08T16:42:52Z")

</div>

Good afternoon,

I am writting here because I am currently experiencing the same problem. I tried all the solutions mentioned above, I reinstalled Dynare, tried several versions, and created a dedicated “work” subfile.

Here is the complete Matlab output. I am using a student version, 7.10.0 (R2010a)

EDU\>\> addpath c:\dynare\4.1.0\matlab  
EDU\>\> cd c:\dynare\work  
EDU\>\> dynare CashInAdvanceModel-1

Configuring Dynare …  
[mex] Generalized QZ.  
[mex] Sylvester equation solution.  
[mex] Kronecker products.  
[mex] Sparse kronecker products.  
[mex] Bytecode evaluation.  
[mex] k-order perturbation solver.  
[mex] k-order solution simulation.

Starting Dynare (version 4.1.0).  
Starting preprocessing of the model file …  
Found 13 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1  
Processing outputs …done  
Preprocessing completed.  
Starting MATLAB/Octave computing.

??? Error using ==\> evalin  
Undefined function or variable ‘CashInAdvanceModel’.

Error in ==\> dynare at 132  
evalin(‘base’,fname) ;

It seems to me that the problem comes from that Matlab doesn’t recognize the “CashInAdvanceModel” function which is defined in the .mod file

This is really frustrating because I have been stuck with this issue for a couple of hours and I can’t finish my work…

I really appreciate your help,

Thank you for your time and consideration.

Best regards,

Julien  
[CashInAdvanceModel-1.mod](https://forum.dynare.org/uploads/default/original/1X/65b1d3c2eceec261a2a9d09342cd2c5d397bfa8e.mod) (2.92 KB)

---

<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:** [8 March 2011 17:20 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/27 "2011-03-08T17:20:32Z")

</div>

First, only use alphanumeric characters in the filename. So do not use a “-”.  
Second, in the mod-file, delete the last for loop. The “%” used for defining the string format interferes with Matlab’s use of % for comments, when preprocessing with Dynare.

---

<div class="post-metadata">

**Author:** ![merdogul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@merdogul](https://forum.dynare.org/u/merdogul)\
**Post date:** [22 January 2012 16:38 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/28 "2012-01-22T16:38:51Z")

</div>

Hi,

i am using Dynare 4.2.4 and Matlab 7.12.0 (R2011a) and i set path to the directory c:\dynare\4.2.4\matlab but still have the same problem:

??? Error: Unexpected MATLAB operator.

Error in ==\> dynare at 120  
evalin(‘base’,fname) ;

what can i do to fix this?

Thanks  
[homework\_4\_ques1.mod](https://forum.dynare.org/uploads/default/original/2X/6/698258af150bfeddaa39471dd089d616d257f941.mod) (3.87 KB)

---

<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:** [22 January 2012 21:59 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/29 "2012-01-22T21:59:44Z")

</div>

The command

```auto

```

works fine for me. Did you rename the mod-file before uploading it?

---

<div class="post-metadata">

**Author:** ![merdogul](https://forum.dynare.org/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@merdogul](https://forum.dynare.org/u/merdogul)\
**Post date:** [22 January 2012 22:53 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/30 "2012-01-22T22:53:43Z")

</div>

Hi,

i did not change the file name but recognize that i wrote wrong command to run the code.

thank you very much…

---

<div class="post-metadata">

**Author:** ![jum63](https://forum.dynare.org/letter_avatar_proxy/v4/letter/j/6a8cbe/32.png) [@jum63](https://forum.dynare.org/u/jum63)\
**Post date:** [24 February 2013 14:30 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/31 "2013-02-24T14:30:36Z")

</div>

Hello  
I am trying to run fixed labor of Ramsey model with tax.But I have a problem.  
my MATLAB version is R2012b.

error is

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.

Starting Dynare (version 4.3.2).  
Starting preprocessing of the model file …  
Found 4 equation(s).  
Evaluating expressions…done  
Computing static model derivatives:

- order 1  
Computing dynamic model derivatives:
- order 1
- order 2  
Processing outputs …done  
Preprocessing completed.  
Starting MATLAB/Octave computing.

Error: Unexpected MATLAB operator.

Error in ==\> dynare (line 120)  
evalin(‘base’,fname) ;

Can you help me to solve this problem?

thanks  
[unt.mod](https://forum.dynare.org/uploads/default/original/2X/a/a363edd811f7f3407d5d9aaa4edc6ea1029801f8.mod) (667 Bytes)

---

<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 February 2013 13:33 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/32 "2013-02-25T13:33:02Z")

</div>

Why are there @ signs in you file?

---

<div class="post-metadata">

**Author:** ![Nemo4t](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/e99b99/32.png) [@Nemo4t](https://forum.dynare.org/u/Nemo4t)\
**Post date:** [6 November 2014 11:04 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/33 "2014-11-06T11:04:04Z")

</div>

Hello,

I am trying to run the attached file but I keep on receiving this error message:

??? Error using ==\> sigma at 83  
Not enough input arguments.

Error in ==\> RBClevels2nd at 102  
set\_param\_value(‘sigma’,sigma)

Error in ==\> dynare at 180  
evalin(‘base’,fname) ;

I am spending a lot of time on it, could you please provide any help with it?

Thank you.  
[RBClevels2nd.mod](https://forum.dynare.org/uploads/default/original/2X/7/7e62a5bebcda85b714f92c3f4e9094b44461622f.mod) (629 Bytes)

---

<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:** [6 November 2014 11:09 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/34 "2014-11-06T11:09:46Z")

</div>

Matlab does not know sigma and tries to call the function called sigma. Are you sure that the file you load actually contains a parameter named sigma?

---

<div class="post-metadata">

**Author:** ![Nemo4t](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/e99b99/32.png) [@Nemo4t](https://forum.dynare.org/u/Nemo4t)\
**Post date:** [6 November 2014 11:38 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/35 "2014-11-06T11:38:50Z")

</div>

Even if I give some value to sigma (0.07) and nu (3) it doesn’t work

---

<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:** [6 November 2014 11:55 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/36 "2014-11-06T11:55:59Z")

</div>

The attached file works on my machine. Did you forget the semicolon at the end of the line?  
[RBClevels2nd.mod](https://forum.dynare.org/uploads/default/original/2X/2/27185023e7c395703286e8c233e48fb635362222.mod) (588 Bytes)

---

<div class="post-metadata">

**Author:** ![Nemo4t](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/e99b99/32.png) [@Nemo4t](https://forum.dynare.org/u/Nemo4t)\
**Post date:** [6 November 2014 12:30 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/37 "2014-11-06T12:30:39Z")

</div>

Great! I don’t really know how you did it, but It works!

Tanks a lot!

---

<div class="post-metadata">

**Author:** ![Nemo4t](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/e99b99/32.png) [@Nemo4t](https://forum.dynare.org/u/Nemo4t)\
**Post date:** [10 November 2014 10:22 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/38 "2014-11-10T10:22:38Z")

</div>

On the same model I would like to display (and eventually manage) the time varing policy matrix.  
I tried different solutions but I just couldn’t, can anyone help me with it?

---

<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:** [10 November 2014 16:48 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/39 "2014-11-10T16:48:48Z")

</div>

What do you mean with

> [@](#):
>
> time varing policy matrix

?

---

<div class="post-metadata">

**Author:** ![Nemo4t](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/e99b99/32.png) [@Nemo4t](https://forum.dynare.org/u/Nemo4t)\
**Post date:** [11 November 2014 08:35 UTC](https://forum.dynare.org/t/error-evalin-base-fname/1088/40 "2014-11-11T08:35:10Z")

</div>

I mean the G3 matrix in the model 3rd order aproximated.

[Previous page](https://forum.dynare.org/t/error-evalin-base-fname/1088.md?page=1)

[Next page](https://forum.dynare.org/t/error-evalin-base-fname/1088.md?page=3)
