I have a stupid problem. I want to know how many files were selected after:
[fileName, pathName, filterIndex] = uigetfile({'*.*';'*.xls';'*.txt';'*.csv'}, 'Select file(s)', 'MultiSelect', 'on');
when there was more than 1, i can do
length(fileName);
and its ok. But when there was only one selected, this gives me actual length of fileName (amount of chars) :/
You should probably check with
iscell(filename)first.UPDATE: added check on cancellation from
uigetfileas was suggested in a comment.