Reading and labeling 1D data in MATLAB

6 vues (au cours des 30 derniers jours)
Tehreem Syed
Tehreem Syed le 10 Août 2020
Commenté : Walter Roberson le 10 Août 2020
Hi,
I have 7 folder A,B,C,D,E,FG. In all 7 folders, I have multple .csv files containing data. Folder A contains 7 exel files. Folder B,C,D,E,F,G contains 5,6,4,8,9,6 files respectively. Data is stored in the exel files in the followiing format.
I want to read all these files. After reading I want to label this data. I want to give label 0,1,2,3,4,5,6 to folder A,B,C,D,E,F,G respectively. How i can read and label this data in MATLAB? Please guide me. Thanks
  3 commentaires
Tehreem Syed
Tehreem Syed le 10 Août 2020
Thanks for your answer. But i have multiple folders. I have to read multple exel files from multiple folders.
Walter Roberson
Walter Roberson le 10 Août 2020
Yes. You would name the container folder and use IncludeSubdir.
To get the labels, use the Files property, and use fileparts() and take the first output. That will be the qualified folder name. Now use fileparts on that, but take the second output: that will give you the last folder name. You would use those as the label.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Develop Apps Using App Designer dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by