DIARY Save the text of a MATLAB session. DIARY file_name causes a copy of all subsequent terminal input and most of the resulting output to be written on the named file. DIARY OFF suspends it. DIARY ON turns it back on. DIARY, by itself, toggles the diary state.