why does try-catch command fail sometime?

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

why does try-catch command fail sometime?

Postby yvette-hyq » Tue Jan 01, 2013 1:10 pm

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.
yvette-hyq
 
Posts: 9
Joined: Fri Sep 10, 2010 9:51 am

Re: why does try-catch command fail sometime?

Postby jpfeifer » Mon Jan 07, 2013 5:40 pm

Are you using Matlab or Octave. Which Dynare version? Can you replicate the error? If yes, please send me the mod-file.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 7 guests