Function Reference

Input and Output

Basic Input and Output

ans
The most recently computed result that was not explicitly assigned to a variable.
disp
Display the value of X.
format
Control the format of the output produced by `disp' and Octave's normal echoing mechanism.
more
Turn output pagination on or off.
PAGER
Query or set the internal variable that specifies the program to use to display terminal output on your system.
PAGER_FLAGS
Query or set the internal variable that specifies the options to pass to the pager.
page_screen_output
Query or set the internal variable that controls whether output intended for the terminal window that is longer than one page is sent through a pager.
page_output_immediately
Query or set the internal variable that controls whether Octave sends output to the pager as soon as it is available.
fflush
Flush output to FID.
input
Print a prompt and wait for user input.
menu
Print a title string followed by a series of options.
kbhit
Read a single keystroke from the keyboard.
save
Save the named variables V1, V2, .
load
Load the named variables V1, V2, .
default_save_options
Query or set the internal variable that specifies the default options for the `save' command, and defines the default format.
save_precision
Query or set the internal variable that specifies the number of digits to keep when saving data in text format.
save_header_format_string
Query or set the internal variable that specifies the format string used for the comment line written at the beginning of text-format data files saved by Octave.
native_float_format
Return the native floating point format as a string
fdisp
Display the value of X on the stream FID.
dlmwrite
Write the matrix A to the named file using delimiters.
dlmread
Read the matrix DATA from a text file.
csvwrite
Write the matrix X to a file.
csvread
Read the matrix X from a file.
crash_dumps_octave_core
Query or set the internal variable that controls whether Octave tries to save all current variables to the file "octave-core" if it crashes or receives a hangup, terminate or similar signal.
sighup_dumps_octave_core
Query or set the internal variable that controls whether Octave tries to save all current variables to the file "octave-core" if it receives a hangup signal.
sigterm_dumps_octave_core
Query or set the internal variable that controls whether Octave tries to save all current variables to the file "octave-core" if it receives a terminate signal.
octave_core_file_options
Query or set the internal variable that specifies the options used for saving the workspace data if Octave aborts.
octave_core_file_limit
Query or set the internal variable that specifies the maximum amount of memory (in kilobytes) of the top-level workspace that Octave will attempt to save when writing data to the crash dump file (the
octave_core_file_name
Query or set the internal variable that specifies the name of the file used for saving data from the top-level workspace if Octave aborts.
rat
Find a rational approximation to X within tolerance defined by TOL using a continued fraction expansion.
rats
Convert X into a rational approximation represented as a string.

C-Style I/O Functions

stdin
Return the numeric value corresponding to the standard input stream.
stdout
Return the numeric value corresponding to the standard output stream.
stderr
Return the numeric value corresponding to the standard error stream.
fopen
The first form of the `fopen' function opens the named file with the specified mode (read-write, read-only, etc.
fclose
Closes the specified file.
fputs
Write a string to a file with no formatting.
puts
Write a string to the standard output with no formatting.
fgetl
Read characters from a file, stopping after a newline, or EOF, or LEN characters have been read.
fgets
Read characters from a file, stopping after a newline, or EOF, or LEN characters have been read.
printf
Print optional arguments under the control of the template string TEMPLATE to the stream `stdout' and return the number of characters printed.
fprintf
This function is just like `printf', except that the output is written to the stream FID instead of `stdout'.
sprintf
This is like `printf', except that the output is returned as a string.
fscanf
In the first form, read from FID according to TEMPLATE, returning the result in the matrix VAL.
sscanf
This is like `fscanf', except that the characters are taken from the string STRING instead of from a stream.
fread
Read binary data of type PRECISION from the specified file ID FID.
fwrite
Write data in binary form of type PRECISION to the specified file ID FID, returning the number of values successfully written to the file.
mkstemp
Return the file ID corresponding to a new temporary file with a unique name created from TEMPLATE.
tmpfile
Return the file ID corresponding to a new temporary file with a unique name.
tmpnam
Return a unique temporary file name as a string.
feof
Return 1 if an end-of-file condition has been encountered for a given file and 0 otherwise.
ferror
Return 1 if an error condition has been encountered for a given file and 0 otherwise.
freport
Print a list of which files have been opened, and whether they are open for reading, writing, or both.
ftell
Return the position of the file pointer as the number of characters from the beginning of the file FID.
fseek
Set the file pointer to any location within the file FID.
SEEK_SET
Return the value required to request that `fseek' perform one of the following actions: `SEEK_SET' Position file relative to the beginning.
frewind
Move the file pointer to the beginning of the file FID, returning 0 for success, and -1 if an error was encountered.