Skip to content

Instantly share code, notes, and snippets.

@tsalo
Created August 12, 2015 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsalo/860205312ad6bf7ed2c7 to your computer and use it in GitHub Desktop.
Save tsalo/860205312ad6bf7ed2c7 to your computer and use it in GitHub Desktop.
% Dir results to cell array of file names
AllTextFiles = dir('/home/tsalo/*.txt');
cellArray = struct2cell(AllTextFiles);
cellArray = cellArray(1, :);
[allFilepaths, allFilenames, allSuffixes] = cellfun(@(X) fileparts(X), cellArray, 'UniformOutput', false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment