From a016d3c5218d46baa56e129c1159cfef196dd608 Mon Sep 17 00:00:00 2001 From: Marco Ratto Date: Wed, 6 Apr 2011 13:08:22 +0200 Subject: [PATCH] explicit mat extension with save (octave compatibility) --- matlab/selec_posterior_draws.m | 6 +++--- matlab/simulated_moments_estimation.m | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/matlab/selec_posterior_draws.m b/matlab/selec_posterior_draws.m index 175d7a257..7f7cb0f1d 100644 --- a/matlab/selec_posterior_draws.m +++ b/matlab/selec_posterior_draws.m @@ -118,7 +118,7 @@ if info old_mhblck = mhblck; end clear('x2') - save([fname '_posterior_draws1'],'pdraws') + save([fname '_posterior_draws1.mat'],'pdraws') else% The posterior draws are saved in xx files. NumberOfDrawsPerFile = fix(MAX_mega_bytes/drawsize); NumberOfFiles = ceil(SampleSize*drawsize/MAX_mega_bytes); @@ -145,7 +145,7 @@ if info old_mhblck = mhblck; if fnum < NumberOfFiles && linee == NumberOfDrawsPerFile linee = 0; - save([fname '_posterior_draws' num2str(fnum)],'pdraws') + save([fname '_posterior_draws' num2str(fnum) '.mat'],'pdraws') fnum = fnum+1; if fnum < NumberOfFiles pdraws = cell(NumberOfDrawsPerFile,info); @@ -154,6 +154,6 @@ if info end end end - save([fname '_posterior_draws' num2str(fnum)],'pdraws') + save([fname '_posterior_draws' num2str(fnum) '.mat'],'pdraws') end end \ No newline at end of file diff --git a/matlab/simulated_moments_estimation.m b/matlab/simulated_moments_estimation.m index 089d3fbd7..141ce3a2e 100644 --- a/matlab/simulated_moments_estimation.m +++ b/matlab/simulated_moments_estimation.m @@ -238,7 +238,7 @@ elseif options.optimization_routine==0% Compute the variance of the SMM estimato elseif options.optimization_routine<0 T = -options.optimization_routine;% length of the simulated time series. time_series = extended_path(oo_.steady_state,T,1); - save time_series; + save time_series.mat; end