Skip to content
Snippets Groups Projects
Commit 9aa02c28 authored by michel's avatar michel
Browse files

4.0: merged r2420 changeset from trunk (bug in moments_varendo)

git-svn-id: https://www.dynare.org/svn/dynare/branches/4.0@2489 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 61285dd6
No related branches found
No related tags found
No related merge requests found
...@@ -31,14 +31,17 @@ function [info,description] = check_posterior_analysis_data(type,M_) ...@@ -31,14 +31,17 @@ function [info,description] = check_posterior_analysis_data(type,M_)
mhdate = get_date_of_a_file(mhname); mhdate = get_date_of_a_file(mhname);
%% Get informations about _posterior_draws files. %% Get informations about _posterior_draws files.
if ~exist([ M_.dname '/metropolis/' M_.fname '_posterior_draws.mat']) drawsinfo = dir([ M_.dname '/metropolis/' M_.fname '_posterior_draws*.mat']);
if isempty(drawsinfo)
info = 1; % select_posterior_draws has to be called first. info = 1; % select_posterior_draws has to be called first.
if nargout>1 if nargout>1
description = 'select_posterior_draws has to be called.'; description = 'select_posterior_draws has to be called.';
end end
return return
else else
pddate = get_date_of_a_file([ M_.dname '/metropolis/' M_.fname '_posterior_draws.mat']); number_of_last_posterior_draws_file = length(drawsinfo);
pddate = get_date_of_a_file([ M_.dname '/metropolis/' M_.fname '_posterior_draws'...
int2str(number_of_last_posterior_draws_file) '.mat']);
if pddate<mhdate if pddate<mhdate
info = 2; % _posterior_draws files have to be updated. info = 2; % _posterior_draws files have to be updated.
if nargout>1 if nargout>1
......
...@@ -118,7 +118,7 @@ function SampleAddress = selec_posterior_draws(SampleSize,drsize) ...@@ -118,7 +118,7 @@ function SampleAddress = selec_posterior_draws(SampleSize,drsize)
old_mhblck = mhblck; old_mhblck = mhblck;
end end
clear('x2') clear('x2')
save([fname '_posterior_draws'],'pdraws') save([fname '_posterior_draws1'],'pdraws')
else% The posterior draws are saved in xx files. else% The posterior draws are saved in xx files.
NumberOfDrawsPerFile = fix(MAX_mega_bytes/drawsize); NumberOfDrawsPerFile = fix(MAX_mega_bytes/drawsize);
NumberOfFiles = ceil(SampleSize*drawsize/MAX_mega_bytes); NumberOfFiles = ceil(SampleSize*drawsize/MAX_mega_bytes);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment