ensure only lowercase files are retrieved

time-shift
Houtan Bastani 2020-03-16 14:55:58 +01:00 committed by Sébastien Villemot
parent 05c7925620
commit a16023103b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 3 additions and 2 deletions

View File

@ -55,8 +55,9 @@ end
% We use the raw files, i.e. those that are *not* the output of
% ReshapeMatFiles.m. Their filename contains 'irf_dsge' in *lowercase*.
NumberIRFsFiles = length(dir([M_.dname '/metropolis/' M_.fname '_irf_dsge*']));
filesUpperAndLower = dir([M_.dname '/metropolis/' M_.fname '_irf_dsge*']);
filesLower = cellfun(@any, regexp({filesUpperAndLower.name}, [M_.fname '_irf_dsge\d\.mat']));
NumberIRFsFiles = sum(filesLower);
if NumberIRFsFiles == 0
error('Can''t find posterior IRFs file(s)')
end