How can I import multiple text files by clicking a button in MATLAB GUI ?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, everyone!
I have to import all the text files in a folder by clicking a button in MATLAB GUI. The file contains mixed data: Text in the starting lines, followed by columns headers and data in which first 2 columns are date and time and the remaining data contains float values). I am unable to do it. Please help me out.
Thank you.
2 Commenti
KSSV
il 24 Mar 2017
There are functions like importdata, testread, textscan to read text files. Have you read those?
Risposte (1)
Nagini Venkata Krishna Kumari Palem
il 28 Mar 2017
In my understanding you are looking for solution to read text files of different formats. You can use 'uiimport' command from command window or use 'import data' option from home tab.
- Customize the format of imported data and variable names as required using the relevant options in import tool.
- Click on the drop-down menu under 'Import Selection' and select 'Generate Script'.
- Using the generated script, you can import data from other files in the same format, all you have to do is change the filename.
For more information you can refer to the following documentation pages,
If you are looking for how to import all the files from a folder, one possible solution would be to iterate through all the files in a loop.
0 Commenti
Vedere anche
Categorie
Scopri di più su MATLAB Report Generator in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!