Page 1 of 1

why does try-catch command fail sometime?

PostPosted: Tue Jan 01, 2013 1:10 pm
by yvette-hyq
I have been using try-catch command in my loop for solving economic model using Dynare. It does the job normally, but sometimes it doesn't. For example, the following error happens all the time, and the try-catch command catches the error and moves on to next iteration. But yesterday, it stops the whole program.

'Blanchard Kahn conditions are not satisfied: indeterminacy.

the code I am using is:
try
dynare US_EAcoordination;
catch err
load file_name;
load(model_type);
tem_iteration = strcat('iteration_',num2str(iteration));
estimation.(char(tem_iteration)).errmag = err.message;
save(model_type,'estimation','-append');
end

Thanks so much.

Re: why does try-catch command fail sometime?

PostPosted: Mon Jan 07, 2013 5:40 pm
by jpfeifer
Are you using Matlab or Octave. Which Dynare version? Can you replicate the error? If yes, please send me the mod-file.