MATLAB: How to use fullfile with cell arrays

fullfileuigetfile

[filename, pathname]=uigetfile('MultiSelect','on','*.dat')
f = fullfile(pathname,filename)
filename =
Columns 1 through 5
[1x60 char] [1x60 char] [1x60 char] [1x60 char] [1x60 char]
Columns 6 through 10
[1x60 char] [1x60 char] [1x60 char] [1x60 char] [1x60 char]
Columns 11 through 12
[1x60 char] [1x60 char]
pathname =
C:\Documents and Settings\
??? Undefined function or method 'eq' for input arguments of type 'cell'.
Error in ==> fullfile at 37 if (f(end)==fs) && (part(1)==fs),
Error in ==> load at 3 f = fullfile(pathname,filename)
I'm trying to get the pathname and filename of a set of dat files from a single directory, and want to use fullfile to connect the names together. But I get the above error. Thank you in advance.

Best Answer

f = cellfun(@(S) fullfile(pathname, S), filename, 'Uniform', 0);