1 %> @ingroup ioio
string
3 %> @brief Auxiliar to @ref mergetool.m
4 function [filenames, groupcodes] =
resolve_dir(wild, trimdot, flag_image)
16 filenames{i} = a(k).name;
17 idxs = find([filenames{i},
'.'] ==
'.');
21 idx_idx_trim = max(1, length(idxs)-trimdot);
22 code = filenames{i}(1:idxs(idx_idx_trim)-1);
28 irerror(
'Trimdot < 1 does not allow for file order extraction!');
30 irerror('No dots in filename!');
33 orderref(i) = eval(filenames{i}(idxs(idx_idx_trim)+1:idxs(idx_idx_trim+1)-1));
35 irerror(
'Error trying to find a sequential number across the filenames!');
42 [vv, ii] = sort(orderref);
43 filenames = filenames(ii);
44 groupcodes = groupcodes(ii);
function resolve_dir(in wild, in trimdot, in flag_image)