I have a program in Octave that has a loop - running a function with various parameters, not something that I can turn into matrices. At the beginning of each iteration I p
If I understand your question correctly, you can use diary function to dump all session output to a text file. diary on will start recording, and diary off will stop. diary filename will use filename instead of default "diary".
It is build -in function in both Octave and MATLAB. For more details see help diary.
Also you can increase Octave buffer size. On Windows you can do it in Octave Properties dialog from upper left corner menu.