How do I pass a cell array like
pathParts = {'D:', 'foo', 'matic'}
to fullfile
to obtain a complete path (i.e. D:\foo\matic
)?
As follows:
fullfile(pathParts{:})
By colon indexing of a cell array, MATLAB will return a comma separated list. This you can then easily pass to other functions.