Still some errors in dsgelikelihood are present that are not trapped: use try catch when evaluating target function;

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3078 ac1d8469-bf42-47a9-8791-bf33cf982152
time-shift
ratto 2009-10-23 12:01:34 +00:00
parent 8a56ed35ad
commit e601d7bec1
1 changed files with 4 additions and 0 deletions

View File

@ -82,7 +82,11 @@ for b = fblck:nblck,
while j <= nruns(b)
par = feval(ProposalFun, ix2(b,:), d * jscale, n);
if all( par(:) > mh_bounds(:,1) ) & all( par(:) < mh_bounds(:,2) )
try
logpost = - feval(TargetFun, par(:),varargin{:});
catch
logpost = -inf;
end
else
logpost = -inf;
end