Accessing Path names for reading Excel and saving .mat files in same folder
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have Excel data files in a number of folders under the MATLAB folder (all on the MATLAB path). To speed up analysis, I would like to only read the Excel file once, and then save the variables in a .mat file *in the same folder *as the original Excel file.
How do you get the actual path name for the Excel file without having to manually input it so it can be prepended to the .mat file name?
Thanks
Doug
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 23 Okt. 2012
Together with:
idx = find(TheFilename == '.', 1, 'last');
NewFilename = TheFilename;
NewFilename(idx:end) = '.mat';
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Spreadsheets finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!