Saving data from the command window
Ältere Kommentare anzeigen
Hi All,
I have a matlab code, where I need to save the data (as a txt file) at the end. I can save it in a file in the editor itself. Is there any way that I can save the data from the command window? I mean, once run the code, I will asked to save it or not, if say yes, then it will ask me to give a name and then save it.
I appreciate for your help. Graig.
Akzeptierte Antwort
Weitere Antworten (2)
Graig
am 14 Feb. 2011
0 Stimmen
Graig
am 14 Feb. 2011
0 Stimmen
1 Kommentar
Walter Roberson
am 14 Feb. 2011
You use uiputfile to determine the directory and file name that the user wants to write to. Then you use fullfile() to split the directory and filename together to produce an absolute path, and then you use the function form of save,
save(ThePathName, 'a')
Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!