Skip to content
Snippets Groups Projects
Commit 5ae06a21 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
parent 858a1b9b
Branches
Tags
1 merge request!622Bug fix with metropolis with load_mh_file option
......@@ -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