Dear all,
in SPM12, spm_select is basically a wrapper around cfg_getfile. Both share the same syntax and subcommands for listing files. The most important difference is that cfg_getfile returns cellstr lists of files, while spm_select returns char arrays for compatibility reasons. If one doesn't need char arrays, cfg_getfile can be used directly.
Conversion between cellstr and char arrays actually doesn't need manual deblank in most cases. Just wrapping cellstrings into char() and char arrays into cellstr() is usually sufficient:
files_char = [
'file1 '
'file11'
];
files_cellstr = {
'file1'
'file11'
};
>> isequal(files_char,char(files_cellstr))
ans =
1
>> isequal(cellstr(files_char),files_cellstr)
ans =
1
Best,
Volkmar
|