by Bas Kooijman, 5 April 2002
This note assumes that Octave 3 is installed, and that you type the codes on Octaves' command line that are shown in magenta (while skipping the comments, of course).
.mand does not start with the word
function. After saving the script file with some editor (such as Emacs) in plain ascii, type the name of the script file on Octave's command line (without extension
.m) and Octave executes the file as if all its contents was typed in on the command line.
Label all script-files well with explanatory text, including your name, date and purpose, such that it makes sense when you see it again much later.
Add enough explanations in your script files and functions.
All text on a line after character
% is not executed by Octave. Emacs expects
%% if a whole line is explanatory text.
help function-nameto get an explantion how a function works.
whos to get information about the variables and functions that are known at any given moment.
a = 2;