.mat file name as a variable
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Megan Miller
il 24 Giu 2019
Risposto: Jeff Miller
il 24 Giu 2019
I have ~50 .mat files to run through a script and extract one row of specified values per file. I'm then exporting each row to an excel spreadsheet. My problem is that I want to include the .mat file name as a column in the spreadsheet, so I need to save the name as a variable. Since I'm manually opening each .mat file, I can't find a way to reference its name in the script. Any suggestions? Thanks!
0 Commenti
Risposta accettata
Jeff Miller
il 24 Giu 2019
use uigetfile to manually select the file name, so that you have the name as a string, fname. Then you can use load(fname) to load in the file and you can store fname in a cell of the spreadsheet.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets 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!