Skip to content
Snippets Groups Projects
Commit eaedc6c9 authored by Marco Ratto's avatar Marco Ratto
Browse files

Fixed bug when the last saved metropolis block is complete and a metropolis is...

Fixed bug when the last saved metropolis block is complete and a metropolis is continued with load_mh_file

(cherry picked from commit 5ae06a21)
parent eef446a6
Branches
Tags
1 merge request!621metropolis bug fix with load_mh_file
......@@ -243,13 +243,14 @@ elseif options_.load_mh_file && ~options_.mh_recover
LastLineNumber = record.LastLineNumber;
if LastLineNumber < MAX_nruns
NewFile = ones(nblck,1)*LastFileNumber;
fline = ones(nblck,1)*(LastLineNumber+1);
else
NewFile = ones(nblck,1)*(LastFileNumber+1);
fline = ones(nblck,1);
end
ilogpo2 = record.LastLogPost;
ix2 = record.LastParameters;
fblck = 1;
fline = ones(nblck,1)*(LastLineNumber+1);
NumberOfPreviousSimulations = sum(record.MhDraws(:,1),1);
fprintf('Estimation::mcmc: I am writting a new mh-history file... ');
record.MhDraws = [record.MhDraws;zeros(1,3)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment