Interleaving and Diary Questions

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Interleaving and Diary Questions

Martin Senator-2
Hello,

Let me apologize in advance for asking two, possibly trivial
questions;  but I have read the documentation and tried and
still not found useful answers.
I'm a new Octave user.  I've been able to quickly get useful numerical
results and plots, but I've run into two procedural difficulties.

1) In two other interactive languages I have used,
S under Unix and Matlab under Windows,
mechanisms exists to read commands from a file of commands,
and to display each command immediately followed by the output it
produces.  Thus, I can see what happens immediately on the
screen, interrupt things when I see a mistake, edit the
command file, and try again.

In Octave I have only been able to see command output,
unless I  use the brute strength method of preceding each
command in the file with an instruction to print (disp) the
command.

Is there a convenient way to achieve this result?

2) I have not been able to include the 'diary on' command at the
beginning of a command file  (or before calling the command file)
and the 'diary off' command at the end (or after returning from the
command file) and get octave to actually store the alternated
commands and the output they produce in the 'diary' file.

How can I do this?

Thanks,


Martin Senator
Davidson Laboratory
Stevens Institute of Technology