add 'var' restriction to exist() tests (more of the same is needed in other functions)

time-shift
Michel Juillard 2011-03-26 20:19:23 +01:00
parent d0b68189da
commit 4d5dc228a8
1 changed files with 3 additions and 3 deletions

View File

@ -217,7 +217,7 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
else
flag = 1;
end
if ~exist('igg'), % by M. Ratto
if ~exist('igg','var'), % by M. Ratto
hh=[];
gg=[];
igg=[];
@ -246,10 +246,10 @@ if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
fval = DsgeVarLikelihood(xparam1,gend);
end
OldMode = fval;
if ~exist('MeanPar')
if ~exist('MeanPar','var')
MeanPar = xparam1;
end
if exist('hh')
if exist('hh','var')
CovJump = inv(hh);
else% The covariance matrix is initialized with the prior
% covariance (a diagonal matrix) %%Except for infinite variances ;-)