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