How can I save the MATLAB Command Window output to a text file?
Mostrar comentarios más antiguos
How can I save the MATLAB command window output to a text file?
Respuesta aceptada
Más respuestas (1)
laurent jalabert
el 10 de Feb. de 2021
Editada: laurent jalabert
el 10 de Feb. de 2021
0 votos
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')
Categorías
Más información sobre Entering Commands en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!