Error in dynare (line 281) evalin(‘base’,[fname ‘.driver’]) ;


I tried to execute the built-in example1.mod file and I encountered the following error:

dynare example1.mod
Starting Dynare (version 5.0).
Calling Dynare with arguments: none
Starting preprocessing of the model file …
Found 6 equation(s).
Evaluating expressions…done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 2).
Processing outputs …
Preprocessing completed.

Unable to resolve the name example1.driver.
Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);

FYI, I browsed similar posts in this forum and followed the advice (e.g. reinstallation). But unfortunately it didn’t work. I don’t enough experience in dealing with such type of errors. I’d highly appreciate if if someone helps me in this regard.

Did you try to do


and then set the path to Dynare/5.0/matlab again?

I have just tried and received the same error.

Which Matlab version are you using? And what is the output of

which example1


I am using Matlab R2021b. The output is “Dynare\Work\example1.mod”.
FYI, with dynare 4.6.4 I could successfully execute the example1.mod and some other mod files. Look forward to your reply. Thanks!

I am at a loss what is happening here. Is Dynare\Work\example1.mod the correct file? And is there a Dynare\Work\+example1-folder created?

I think its the correct file because I have copied this file from the folder generated after dynare installation.
Yes Dynare\Work\+example1 -folder is created.

Ok, is there a driver.m in the +example-folder?

Yes, an empty file named driver.m is created there.

Ok, then that seems to be part of the problem. It’s not supposed to be empty. When you encounter the above error message, what is the current folder of Matlab?


And what happens if you move to that folder and type into the command window



I have tried command example1.driver, the output is normal, But when I try to run example3.mod, the same situation occurr.
Unable to resolve the name example1.driver.
Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);
I want to find the problem and solve it, could you help me?

When running example3 why is the error about example1?

oh, sorry. the error is:
Unable to resolve the name example1.driver.
Error in dynare (line 281)
evalin(‘base’,[fname ‘.driver’]);
the same error with example1.mod

Hi @jpfeifer I have also had a similar problem as the last time I ran my model was before the updates in matlab 2019 or recent versions of dynare.

When I run my mod file, kuw_ver.mod stored in user/matlab folder, all outputs (.m, static, dynamic, results etc) are stored in +kuw_ver folder (path: .user/matlab/+kuw_ver).

My problem arises in my estimation file when I run the command eval(fname) and I get the error “‘kuw_ver’ is not found in the current folder or on the MATLAB path”. I think the problem is:

  1. the output results are saved in the new folder
  2. the outputs in the new location are recorded without the original FILENAMES eg formerly “kuw_ver.m” now “driver.m”

My question: Please how do I restate my eval(fname) function to recognise the output in the new output folder or is there a way of adding path or renaming results so that I don’t have to rewrite most parts of my codes? Please can you help with this? thanks

I would need to see the codes. From what I understand, you have a compatibility issue with Dynare 5.x

Hello all,

I am having a similar issue with dynare 4.6.3 (I was using dynare 5.1 before trying this version, and had the same issue). I am using Matlab 2021b.



Without the codes it is impossible tell.

Hello all, I’m trying to run a simple RBC model and to compile a pdf with equations of it. I obtain the warning `

Warning: TeX-File did not compile; you need to compile it manually 
> In rbc0.driver (line 230)
In dynare (line 281)

if I look at line 281 I see this code evalin('base',[fname '.driver']); what kind of error is it? This is my code
rbc0.mod (2.0 KB)