Commit eec90d41 authored by adjemian's avatar adjemian
Browse files

Correction of a bug related to option mh_recover

git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1303 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 95a3c087
......@@ -42,7 +42,7 @@ d = chol(vv);
options_.lik_algo = 1;
OpenOldFile = ones(nblck,1);
if options_.load_mh_file == 0
if ~options_.load_mh_file & ~options_.mh_recover
%% Here we start a new metropolis-hastings, previous draws are not
%% considered.
if nblck > 1
......@@ -174,7 +174,7 @@ if options_.load_mh_file == 0
fprintf(fidlog,[' ' num2str(record.Seeds.Unifor(i)') '\n']);
end
fprintf(fidlog,' \n');
elseif options_.load_mh_file == 1
elseif options_.load_mh_file & ~options_.mh_recover
%% Here we consider previous mh files (previous mh did not crash).
disp('MH: I''m loading past metropolis-hastings simulations...')
file = dir([ MhDirectoryName '/' ModelName '_mh_history.mat' ]);
......@@ -234,7 +234,7 @@ elseif options_.load_mh_file == 1
save([MhDirectoryName '/' ModelName '_mh_history'],'record');
disp(['MH: ... It''s done. I''ve loaded ' int2str(NumberOfPreviousSimulations) ' simulations.'])
disp(' ')
elseif options_.mh_recover == 1
elseif options_.mh_recover
%% The previous metropolis-hastings crashed before the end! I try to
%% recover the saved draws...
disp('MH: Recover mode!')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment