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!
MATLAB: .mat file name as a variable
file namemat
Best Answer