Fix bug introduced in 767dce0a

time-shift
Sébastien Villemot 2013-05-28 10:16:26 +02:00
parent 320b7a1b59
commit 2822fcd979
1 changed files with 2 additions and 1 deletions

View File

@ -372,7 +372,8 @@ files=ls([MhDirectoryName ,filesep, fname '_mh*_blck' int2str(blck) '.mat']); %l
right_string=files(:,length([fname '_mh'])+1:end); %cut off left part of filename
k = cell2mat(strfind(cellstr(right_string),['_blck' int2str(blck) '.mat'])); %find index of position after number
file_numbers=str2num(right_string(:,1:k-1)); %get file number
if sum(sort(file_numbers)-(min(file_numbers):max(file_numbers))')~=0
if ~isempty(file_numbers) && ...
sum(sort(file_numbers)-(min(file_numbers):max(file_numbers))')~=0
error(['There are MH draw files missing within chain ', int2str(blck)])
end