Commit 53d39178 authored by Michel Juillard's avatar Michel Juillard
Browse files

corrected bug in get_name_of_the_last_mh_file.m

parent d4a908dd
......@@ -41,9 +41,11 @@ predicted_mhname = [ MhDirectoryName '/' M_.fname '_mh' int2str(mh_number) '_bl
AllMhFiles = dir([MhDirectoryName '/' M_.fname '_mh*_blck*' ]);
idx = 1;
latest_date = 0;
for i=2:size(AllMhFiles)
if AllMhFiles(i).datenum>AllMhFiles(i-1).datenum
if AllMhFiles(i).datenum > latest_date
idx = i;
latest_date = AllMhFiles(i).datenum;
end
end
mhname = [ MhDirectoryName '/' AllMhFiles(idx).name];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment