How do I get Matlab to return a matrix with all the file names in a folder?
Show older comments
I need to analyze a folder of .txt files. I want to create a for loop that analyzes one file in the folder at a time and organizes their data into a matrix of all the files data. I want the user to select the folder they would like to analyze. I tried this code.
F = dir(uigetdir('*.dat'))
But when I checked the names that it was returning, it was returning '.' for all of the files names. How do I make it return their real names, and why is it not reading the correct file names?
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!