How can I save the MATLAB Command Window output to a text file?
Ältere Kommentare anzeigen
How can I save the MATLAB command window output to a text file?
Akzeptierte Antwort
Weitere Antworten (1)
laurent jalabert
am 10 Feb. 2021
Bearbeitet: laurent jalabert
am 10 Feb. 2021
0 Stimmen
diary_name = strcat(datestr(now),'_diary.txt');
diary_folder = pwd;
diary(diary_name)
disp(datestr(now))
diary off
(I am not sure diary off will stop the currently running diary(diary_name) ...)
It will be nice to write like this :
diary(diary_folder, diary_name,'on')
diary(diary_folder,diary_name,'off')
Kategorien
Mehr zu Entering Commands 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!