How can modify file name that imported by uigetfile.
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
junghyun pyo
il 10 Lug 2019
Commentato: junghyun pyo
il 15 Lug 2019
i want to load some file by uigetfile.
then how can i use uigetfile data when i want to export file, for example
input file name : abc.csv
-------processing-------
output file name : abc_modified.csv
(for export, i use writetable.)
0 Commenti
Risposta accettata
Guillaume
il 10 Lug 2019
Note that if it's for saving/exporting, you should use uiputfile instead of uigetfile.
Regardless, all these functions do is return you a char vector with the name of the selected file. You're free to do whatever you want with that variable, just like any other variable.
[filename, path] = uigetfile;
[~, base, extension] = fileparts(filename);
newfilename = [base, '_modified', extension];
writetable(sometable, fullfile(path, newfilename));
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Dialog Boxes 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!