How do I get Matlab to return a matrix with all the file names in a folder?
Afficher commentaires plus anciens
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?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!