Maybe evalin itself is not the problem. All it does is call a command with the name contained in the string fname. Maybe the string contains something Matlab does not understand (probably an empty space). What is the name of your .mod-file? Dynare builds a Matlab .m-file with the same name as the .mod file and then calls it as a function in this line. If the name of the .mod-file contains empty spaces or characters like “;” “,” “.” or braces, there might be problems. You should be able to see the name of the .m-file created in your directory. Does it look like a regular function name? If this is not the case, just rename the .mod-file.
shocks;
var e1;
stderr 1;
var e2;
stderr 1;
var e3;
stderr 1;
var e4;
stderr 1;
var e5;
stderr 1;
end;
steady;
stoch_simul(dr_algo=0, periods=1000, irf=40);
rplot w n t_n c k y x g d b R r lamda;
and i did not download this from the web–i created with in the m-file editor and save it as .mod file…i don’t know a standard way to create .mod file so that’s what i did. and the name of this .mod file is pset2.mod.