Error in dynare (line 235) evalin('base',fname)

  1. First of all, do not loop over stoch_simul and resol. You only need the latter. In particular, you are not supposed to loop over Dynare syntax, only over the calls to Matlab functions.
  2. You need to condition on the error code returned by resol, i.e. the content of info. It will tell you if the BK conditions are satisfied or not. You can see all cases in print_info.m:
      case 3
        error(['Blanchard Kahn conditions are not satisfied: no stable' ...
               ' equilibrium'])
      case 4
        error(['Blanchard Kahn conditions are not satisfied:' ...
               ' indeterminacy'])
      case 5
        error(['Blanchard Kahn conditions are not satisfied:' ...
               ' indeterminacy due to rank failure'])

The problem you experience is that you are trying to read out a decision rule coefficient, but the model does not have a solution. So the decision rule you are trying to access does not exist.

For a code mapping the determinacy region, see