Evalin error revisited

hi all,
so i followed an advice of yours (thank you so much) and changed the directory to the one where the .mod file is.
and i ran one of the .mod files, and it ran smoothly. and it should since a professor ran it.
and the fact that it ran smoothly with a well-written .mod file shows that i don’t need to reinstall dynare, like someone suggested in a related post.

but as i was trying to run a .mod file that i wrote, i get the same error message, in addition to some other error messages that suggest my model is wrong:

??? Error using ==> print_info at 39
Blanchard Kahn conditions are not satisfied: no stable equilibrium

Error in ==> stoch_simul at 46
print_info(info, options_.noprint);

Error in ==> pset2 at 211
info = stoch_simul(var_list_);

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

this is weird because i understand that the first three errors might be related to the code i wrote and but why am i getting the same message about evalin?
the only reason i can think of is because i produced .mod file by writing it in m-file editor and saving it into .mod file.
can someone please help me?

The reason is that Matlab gives you the hierarchy of all functions below the one that produced the error. The violation of the Blanchard-Kahn conditions tells you that something with your model is wrong. As the message tells you, there are no stable solutions.

The rest of the error message just tells you where exactly the error occured (read the message from bottom to top): dynare.m jumped to the next function with name fname at line 132, then in this next function, pset2 was called, and in line 311 of pset2 the function stoch_simul was called. In this function stoch_simul at line 46 the function print_info was called. In line 39 of this file the violation of the Blanchard-Kahn conditions was detected. So there was no problem with evalin. It is just the command in the first function that subsequently triggered the error. Matlab always reports errors like this. Just fix the model file and everything will run smoothly.

Johannes