- Working With Octave
-
Working With Octave
This section describes basic activities that you perform in the Octave statistical application as it is implemented in the RCE. It includes information about how to perform the following:
- Launch and exit from the menus and from the command prompt
- Access help
- Install new components
See Implementation Details for general information about the implementation of Octave in the RCE, including where to find out more about the tool.
For information about how to access the RCE, refer to Connecting to the RCE Summer 2009.
- Launching and Exiting Octave
-
Launching and Exiting Octave
You can launch Octave in the RCE by using the menus or by typing a command.
Launching Octave
To launch Octave by using the menus in the RCE, select the Applications menu Mathematics submenu, and then choose Octave to launch the tool.
A terminal window is opened and the launch command for Octave executes automatically.
To launch Octave from the CLI, open a terminal window and type the command
octaveat the prompt.Exiting Octave
To exit Octave, type
quitorexit.
- Accessing Built-in Help in Octave
-
Accessing Built-in Help in Octave
To access the built-in Help system in Octave, type
help.To view help in a separate, text-based browser window, type
docordoc <function name>.To view information about a specific command, type
help <command>.To page through the Help contents, type
fto page forward, or typebto page backward.To exit the Help window, type
q.For example:
octave:15> help
Help is available for the topics listed below.
Additional help for built-in functions, operators, and variables
is available in the on-line version of the manual. Use the command
'help -i <topic>' to search the manual index.
Help and information about Octave is also available on the WWW
at http://www.octave.org and via the help-octave@bevo.che.wisc.edu
mailing list.
*** operators:
! # &&)+-.*.^;<>>\|~=
!=% '*++--.**/<=>=]||
"&(**,.'./:<===[^~
-- less -- (f)orward, (b)ack, (q)uit
- Listing and Installing Functions in Octave
-
Listing and Installing Functions in Octave
In Octave, you can import new functions and programs, as well as new data files.
- Listing Functions Available in Octave
-
Listing Functions Available in Octave
In the Octave window, type
helpand page through the Help content to list the functions available in Octave. For example:octave:18> help
...
*** operators: ...
*** reserved words: ...
*** built-in constants: ...
*** built-in variables: ...
*** commands: ...
*** mapper functions: ...
*** general functions: ...
*** function files in /usr/libexec/octave/2.1.57/oct/i686-pc-linus-gnu/: ...
*** function files in /usr/share/octave/2.1.57/m/io/: ...
*** function files in /usr/share/octave/2.1.57/m/audio/: ...
*** function files in /usr/share/octave/2.1.57/m/quaternion/: ...
*** function files in /usr/share/octave/2.1.57/m/elfun/: ...
*** function files in /usr/share/octave/2.1.57/m/miscellaneous/:
...You can view the contents of the Octave installation directory in a terminal window. Type the following command:
> ls /usr/share/octave/2.1.57/m
audiofinance linear-algebraquaternionspecial-matrix time
control general miscellaneous set startup
deprecatedimage plot signal statistics
elfun io polynomial specfun strings
>To view the contents of a specific type of installed Octave function, use the
lscommand to list the contents of a subdirectory. For example, to view the installed finance functions, type the following:> ls /usr/share/octave/2.1.57/m/finance
fvl.m fv.m irr.m nper.m npv.m pmt.m pvl.m pv.m rate.m vol.m
>
- Installing Octave Functions
-
Installing Octave Functions
Code for new Octave functions are added to the default installation directory:
/usr/share/octave/2.1.57/m
As an alternative, code can be added to a new directory. In this case, you must change the search path to include the path for the new code by using the following command:
octave:23> path(path,"<new directory path>")
If you locate an additional function for Octave that is not available in the RCE, contact us and request that we install that function for you.
- Locating Octave Directories
-
Locating Octave Directories
The default installation directory for Octave libraries is:
/usr/share/octave/2.1.57/m
The default location in which Octave searches for files or to which it saves files is the directory from which you launch the Octave tool. In the RCE, that directory is:
/nfs/fs1/home/<First Initial>/<login account username>
To view the directories in which Octave searches for functions, type the following command:
octave:3> path
Octave's search path contains the following directories:
.
/usr/libexec/octave/2.1.57/site/oct/i686-pc-linux-gnu//
/usr/libexec/octave/site/oct/api-v8/i686-pc-linux-gnu//
/usr/libexec/octave/site/oct/i686-pc-linux-gnu//
/usr/share/octave/2.1.57/site/m//
/usr/share/octave/site/api-v8/m//
/usr/share/octave/site/m//
/usr/libexec/octave/2.1.57/oct/i686-pc-linux-gnu//
/usr/share/octave/2.1.57/m//