Cannot run example1.mod in dynare, the example1.mod is one example of examples files of dynare 5.1

the output is :

dynare example1.mod
Starting Dynare (version 5.1).
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’]);

Can you try to add
before line 281 in dynare.m?

I have tried but still wrong, the same error

Can you try a different folder instead of a subfolder of your Matlab installation?

Wow! the error is disappear, everything is alright. Thank you very much. But I still want to the reason.

Either it’s because of special permissions in those folders, a Matlab bug, or problems in refreshing the search path. After all, the subfolders of the Matlab directory are contained in the search path and you are now adding to them.

OK, I got it. Thank you very much, best wishes!