This is Info file octave.info, produced by Makeinfo-1.52 from the input
file octave.texi.

   Copyright (C) 1993 John W. Eaton.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions.


File: octave.info,  Node: Built-in Functions,  Next: Invoking Octave,  Prev: Built-in Variables,  Up: Top

Built-in Functions
******************

`abs'
          abs (a)

`acos'
          acos (a)

`acosh'
          acosh (a)

`all'
          all (a)

`angle'
          angle (a)

`any'
          any (a)

`arg'
          arg (a)

`asin'
          asin (a)

`asinh'
          asinh (a)

`atan'
          atan (a)

`atanh'
          atanh (a)

`bar'
                     bar (x, y)
          [xb, yb] = bar (x, y)

     Given two vectors of x-y data, bar produces a bar graph.

     If only one argument is given, it is taken as a vector of y-values
     and the x coordinates are taken to be the indices of the elements.

     If two output arguments are specified, the data are generated but
     not plotted.  For example,

          bar (x, y);
     and

          [xb, yb] = bar (x, y);
          plot (xb, yb);

     are equivalent.

`casesen'
          casesen

`cd'
          cd

`ceil'
          ceil (a)

`clc'
          clc ()

`clear'
          clear

`clock'
          clock (a)

`closeplot'
          closeplot ()

`colloc'
          [r, A, B, q] = colloc (n)
          [r, A, B, q] = colloc (n, 'left')
          [r, A, B, q] = colloc (n, 'left', 'right')

`columns'
          columns (a)

`computer'
          computer ()

`cond'
          cond (a)

`conj'
          conj (a)

`contour'
          contour (z)
          contour (z, n)
          contour (z, n, x, y)

`cos'
          cos (a)

`cosh'
          cosh (a)

`cumprod'
          cumprod (a)

`cumsum'
          cumsum (a)

`dassl'
          y = dassl ('function_name', x_0, xdot_0, t_out)
          y = dassl ('function_name', x_0, xdot_0, t_out, t_crit)

     Solve DAEs using Petzold's DASSL.

     The first argument is the name of the function to call to compute
     the vector of residuals.  It must have the form

          res = f (x, xdot, t)

     where x, xdot, and res are vectors, and t is a scalar.

`date'
          date ()

`det'
          det (a)

`diag'
          diag (a)
          diag (a, k)

`dir'
          dir

`disp'
          disp (a)

`document'
          document

`edit'
          edit

`eig'
                      = eig (a)
          [lambda, v] = eig (a)

`error'
          error (message)

`eval'
          eval (command)

`exist'
          exist (name)

`exit'
          exit ()

`exp'
          exp (a)

`expm'
          expm (a)

`eye'
          eye (n)
          eye (a)
          eye (n, m)

`fclose'
     Close a file.

`feval'
          feval (name, ...)

`fflush'
     Flush output to a file.

`fft'
          fft (a)

`fgets'
     Read characters from a file.

`find'
          find (a)

`finite'
          finite (a)

`fix'
          fix (a)

`fliplr'
          fliplr (a)

`flipud'
          flipud (a)

`floor'
          floor (a)

`flops'
          flops ()

`fopen'
     Open a file for reading or writing.

`format'
          format

`fprintf'
          fprintf ('file', 'format', ...)

`freport'
     Print a report for all open files.

`frewind'
     Set file position to the beginning of a file.

`fscanf'
     Read from a file.

`fseek'
     Set file position.

`fsolve'
          [x, info] = fsolve ('f', x0)

     Solve nonlinear equations using Minpack.

     Where the first argument is the name of the  function to call to
     compute the vector of function values.  It must have the form

          y = f (x)

     where y and x are vectors.

`fsqp'
          fsqp ()

     Sorry, this hasn't been implemented yet.

`ftell'
     Tell file position.

`getenv'
          getenv (name)

`grid'
          grid ()

`hadamard'
          hadamard (k)

     Return the Hadamard matrix of order n = 2^k.

`hankel'
          hankel (c)
          hankel (c, r)

     Return the Hankel matrix constructed given the first column c, and
     (optionally) the last row r.

     If the second argument is omitted, the last row is taken to be the
     same as the first column.  If the last element of c is not the same
     as the first element of r, the last element of c is used.

`help'
          help

`hess'
               h = hess (a)
          [p, h] = hess (a)

`hilb'
          hilb (n)

     Return the Hilbert matrix of order n.  The i, j element of a
     Hilbert matrix is defined as

          H (i, j) = 1 / (i + j - 1);

`history'
          history

`home'
          home ()

`ifft'
          ifft (a)

`imag'
          imag (a)

`input'
          input (prompt)
          input (prompt, 's')

`int2str'
          int2str (a)

`inv'
`inverse'
          inverse (a)

`invhilb'
          invhilb (n)

     Return the inverse of a Hilbert matrix of order n.  This is slow
     but exact.  Compare with inverse (hilb (n)).

`is_matrix'
          is_matrix (a)

`is_scalar'
          is_scalar (a)

`is_vector'
          is_vector (a)

`isempty'
          isempty (a)

`isinf'
          isinf (a)

`isnan'
          isnan (a)

`isstr'
          isstr (a)

`keyboard'
          keyboard ()
          keyboard (prompt)

`length'
          length (a)

`linspace'
          linspace (base, limit)
          linspace (base, limit, npoints)

`load'
          load

     If a variable that is not marked as global is loaded from a file
     when a global symbol with the same name already exists, it is
     loaded in the global symbol table.

     Also, if a variable is marked as global in a file and a local
     symbol exists, the local symbol is moved to the global symbol
     table and given the value from the file.

     Since it seems that both of these cases are likely to be the
     result of some sort of error, they will generate warnings.

`log'
          log (a)

`log10'
          log10 (a)

`loglog'
          loglog (x, y)

     Make a 2D plot of y versus x using log scales for both axes.

`logm'
          logm (a)

`logspace'
          logspace (base, limit)
          logspace (base, limit, npoints)

`ls'
          ls

`lsode'
          lsode ('function_name', x0, t_out
          lsode ('function_name', x0, t_out, t_crit)

     Solve ODEs using Hindmarsh's LSODE.

     The first argument is the name of the function to call to compute
     the vector of right hand sides.  It must have the form

          xdot = f (x, t)

     where xdot and x are vectors and t is a scalar.

`lu'
          [l, u, p] = lu (a)

`max'
          max (a)

`mean'
          mean (a)

`median'
          median (a)

`menu'
          menu (a)

`mesh'
          mesh (x, y, z)

`meshdom'
          [xx, yy] = meshdom (x, y)

     Given vectors of x and y coordinates, return two matrices
     corresponding to the x and y coordinates of the mesh.

     See the file sombrero.m for an example of using mesh and meshdom.

`min'
          min (a)

`norm'
          norm (a)

`npsol'
          [x, obj, info, lambda] = npsol (x, 'phi')
          [x, obj, info, lambda] = npsol (x, 'phi', lb, ub)
          [x, obj, info, lambda] = npsol (x, 'phi', lb, ub, lb, A, ub)
          [x, obj, info, lambda] = npsol (x, 'phi',         lb, A, ub)
          [x, obj, info, lambda] = npsol (x, 'phi', lb, ub, lb, A, ub, lb, 'g', ub)
          [x, obj, info, lambda] = npsol (x, 'phi',         lb, A, ub, lb, 'g', ub)
          [x, obj, info, lambda] = npsol (x, 'phi',                    lb, 'g', ub)
          [x, obj, info, lambda] = npsol (x, 'phi', lb, ub,            lb, 'g', ub)
     Solve nonlinear programs using Gill and Murray's NPSOL.

     The second argument is a string containing the name of the
     objective function to call.  The objective function must be of the
     form

          y = phi (x)

     where x is a vector and y is a scalar.

`num2str'
          num2str (a)

`ones'
          ones (n)
          ones (a)
          ones (n, m)

`pause'
          pause (n)

`plot'
          plot (x, y)

     This function produces two-dimensional plots.

     If the first argument is a vector and the second is a matrix, the
     the vector is plotted versus the columns (or rows) of the matrix.
     (using whichever combination matches, with columns tried first.)

     If the first argument is a matrix and the second is a vector, the
     the columns (or rows) of the matrix are plotted versus the vector.
     (using whichever combination matches, with columns tried first.)

     If both arguments are vectors, the elements of y are plotted versus
     the elements of x.

     If both arguments are matrices, the columns of y are plotted versus
     the columns of x.  In this case, both matrices must have the same
     number of rows and columns and no attempt is made to transpose the
     arguments to make the number of rows match.

     If both arguments are scalars, a single point is plotted.

     If only one argument is given, it is taken as the set of y
     coordinates and the x coordinates are taken to be the indices of
     the elements, starting with 1.

`polar'
          polar (theta, rho)

     Make a 2D plot given polar the coordinates theta and rho.

`printf'
          printf ('format', ...)

`prod'
          prod (a)

`purge_tmp_files'
          purge_tmp_files ()

`pwd'
          pwd ()

`qpsol'
          [x, obj, info, lambda] = qpsol (x, H, c)
          [x, obj, info, lambda] = qpsol (x, H, c, lb, ub)
          [x, obj, info, lambda] = qpsol (x, H, c, lb, ub, lb, A, ub)
          [x, obj, info, lambda] = qpsol (x, H, c,         lb, A, ub)
     Solve quadratic programs using Gill and Murray's QPSOL.

`qr'
          [q, r] = qr (a)

`quad'
          [v, ier, nfun] = quad ('f', a, b)
          [v, ier, nfun] = quad ('f', a, b, tol)
          [v, ier, nfun] = quad ('f', a, b, tol, sing)

     Integrate a nonlinear function of one variable using Quadpack.

     Where the first argument is the name of the  function to call to
     compute the value of the integrand.  It must have the form

          y = f (x)

     where y and x are scalars.

     The second and third arguments are limits of integration.  Either
     or both may be infinite.  The optional argument tol specifies the
     desired accuracy of the result.  The optional argument sing is a
     vector of at which the integrand is singular.

`quit'
          quit ()

`rand'
          rand (n)
          rand (a)
          rand (n, m)

`rank'
          rank (a)

`real'
          real (a)

`rem'
          rem (a, b)

`replot'
          replot ()

`reshape'
          reshape (a, n, m)

`rot90'
          rot90 (a, n)

`round'
          round (a)

`rows'
          rows (a)

`save'
          save

     Saving global variables also saves the global status of the
     variable, so that if it is restored at a later time using `load',
     it will be restored as a global variable.

`scanf'
     Read from the standard input.

`sscanf'
     Read from a string.

`schur'
          usage: [u, s] = schur (a)
                      s = schur (a)
          
           or, for ordered Schur:
          
                 [u, s] = schur (a, "a, d, or u")
                      s = schur (a, "a, d, or u")
           where:
          
             a = continuous time poles
             d = discrete time poles
             u = unordered schur (default)

`semilogx'
          semilogx (x, y)

     Make a 2D plot of y versus x using a log scale for the x axis.

`semilogy'
          semilogy (x, y)

     Make a 2D plot of y versus x using a log scale for the y axis.

`set'
          set

`shell_cmd'
          shell_cmd (a)

`show'
          show

`sign'
          sign (a)

`sin'
          sin (a)

`sinh'
          sinh (a)

`size'
                     size (a)
          [nr, nc] = size (a)

`sombrero'
          sombrero (n)

`sort'
          sort (a)

`sprintf'
          sprintf ('format', ...)

`sqrt'
          sqrt (a)

`sqrtm'
          sqrtm (a)

`stairs'
          stairs (a)
                     bar (x, y)
          [xs, ys] = bar (x, y)

     Given two vectors of x-y data, bar produces a `stairstep' plot.

     If only one argument is given, it is taken as a vector of y-values
     and the x coordiates are taken to be the indices of the elements.

     If two output arguments are specified, the data are generated but
     not plotted.  For example,

          bar (x, y);

     and

          [xs, ys] = stairs (x, y);
          plot (xs, ys);

     are equivalent.

`std'
          std (a)

`strcmp'
          strcmp (s1, s2)

`sum'
          sum (a)

`sumsq'
          sumsq (a)

`svd'
                  s = svd (a)
          [u, s, v] = svd (a)

`tan'
          tan (a)

`tanh'
          tanh (a)

`texas_lotto'
          texas_lotto ()

`title'
          title (string)

`toeplitz'
          toeplitz (c)
          toeplitz (c, r)

     Return the Toeplitz matrix constructed given the first column c,
     and (optionally) the first row r.

     If the second argument is omitted, the first row is taken to be the
     same as the first column.  If the first element of c is not the
     same as the first element of r, the first element of c is used.

`trace'
          trace (a)

`tril'
          tril (a)
          tril (a, k)

`triu'
          triu (a)
          triu (a, k)

`vander'
          vander (c)
     Return the Vandermonde matrix whose next to last column is c.

`warranty'
          warranty ()

`who'
          who

`xlabel'
          xlabel (string)

`ylabel'
          ylabel (string)

`zeros'
          zeros (n)
          zeros (a)
          zeros (n, m)


File: octave.info,  Node: Invoking Octave,  Next: Command Line Editing,  Prev: Built-in Functions,  Up: Top

Octave Command Options
**********************

`-d'
     Enter parser debugging mode.

`-f'
     Don't read any of the system or user initialization files at
     startup.

`-h'
`-?'
     Print short help message and exit.

`-i'
     Force interactive behavior.

`-p PATH'
     Specify the path to search for M-files.  The value of PATH
     specified on the command line will override any value of
     `OCTAVE_PATH' found in the environment, but not any `LOADPATH =
     "path"' commands found in the system or user startup files.

`-q'
     Don't print message at startup.

`-v'
     Print the program version number and exit.

`-x'
     Echo commands as they are executed.

`FILE'
     Execute commands from FILE.


File: octave.info,  Node: Command Line Editing,  Next: Installation,  Prev: Invoking Octave,  Up: Top

Command Line Editing
********************

   This text describes GNU's command line editing interface.

* Menu:

* Introduction and Notation::   Notation used in this text.
* Readline Interaction::        The minimum set of commands for editing a line.
* Readline Init File::          Customizing Readline from a user's view.


File: octave.info,  Node: Introduction and Notation,  Next: Readline Interaction,  Up: Command Line Editing

Introduction to Line Editing
============================

   The following paragraphs describe the notation we use to represent
keystrokes.

   The text C-k is read as `Control-K' and describes the character
produced when the Control key is depressed and the k key is struck.

   The text M-k is read as `Meta-K' and describes the character
produced when the meta key (if you have one) is depressed, and the k
key is struck.  If you do not have a meta key, the identical keystroke
can be generated by typing ESC first, and then typing k.  Either
process is known as "metafying" the k key.

   The text M-C-k is read as `Meta-Control-k' and describes the
character produced by "metafying" C-k.

   In addition, several keys have their own names.  Specifically, DEL,
ESC, LFD, SPC, RET, and TAB all stand for themselves when seen in this
text, or in an init file (*note Readline Init File::., for more info).


File: octave.info,  Node: Readline Interaction,  Next: Readline Init File,  Prev: Introduction and Notation,  Up: Command Line Editing

Readline Interaction
====================

   Often during an interactive session you type in a long line of text,
only to notice that the first word on the line is misspelled.  The
Readline library gives you a set of commands for manipulating the text
as you type it in, allowing you to just fix your typo, and not forcing
you to retype the majority of the line.  Using these editing commands,
you move the cursor to the place that needs correction, and delete or
insert the text of the corrections.  Then, when you are satisfied with
the line, you simply press RETURN.  You do not have to be at the end of
the line to press RETURN; the entire line is accepted regardless of the
location of the cursor within the line.

* Menu:

* Readline Bare Essentials::    The least you need to know about Readline.
* Readline Movement Commands::  Moving about the input line.
* Readline Killing Commands::   How to delete text, and how to get it back!
* Readline Arguments::          Giving numeric arguments to commands.


File: octave.info,  Node: Readline Bare Essentials,  Next: Readline Movement Commands,  Up: Readline Interaction

Readline Bare Essentials
------------------------

   In order to enter characters into the line, simply type them.  The
typed character appears where the cursor was, and then the cursor moves
one space to the right.  If you mistype a character, you can use DEL to
back up, and delete the mistyped character.

   Sometimes you may miss typing a character that you wanted to type,
and not notice your error until you have typed several other
characters.  In that case, you can type C-b to move the cursor to the
left, and then correct your mistake.  Aftwerwards, you can move the
cursor to the right with C-f.

   When you add text in the middle of a line, you will notice that
characters to the right of the cursor get `pushed over' to make room
for the text that you have inserted.  Likewise, when you delete text
behind the cursor, characters to the right of the cursor get `pulled
back' to fill in the blank space created by the removal of the text.  A
list of the basic bare essentials for editing the text of an input line
follows.

C-b
     Move back one character.

C-f
     Move forward one character.

DEL
     Delete the character to the left of the cursor.

C-d
     Delete the character underneath the cursor.

Printing characters
     Insert itself into the line at the cursor.

C-_
     Undo the last thing that you did.  You can undo all the way back
     to an empty line.


File: octave.info,  Node: Readline Movement Commands,  Next: Readline Killing Commands,  Prev: Readline Bare Essentials,  Up: Readline Interaction

Readline Movement Commands
--------------------------

   The above table describes the most basic possible keystrokes that
you need in order to do editing of the input line.  For your
convenience, many other commands have been added in addition to C-b,
C-f, C-d, and DEL.  Here are some commands for moving more rapidly
about the line.

C-a
     Move to the start of the line.

C-e
     Move to the end of the line.

M-f
     Move forward a word.

M-b
     Move backward a word.

C-l
     Clear the screen, reprinting the current line at the top.

   Notice how C-f moves forward a character, while M-f moves forward a
word.  It is a loose convention that control keystrokes operate on
characters while meta keystrokes operate on words.


File: octave.info,  Node: Readline Killing Commands,  Next: Readline Arguments,  Prev: Readline Movement Commands,  Up: Readline Interaction

Readline Killing Commands
-------------------------

   "Killing" text means to delete the text from the line, but to save
it away for later use, usually by "yanking" it back into the line.  If
the description for a command says that it `kills' text, then you can
be sure that you can get the text back in a different (or the same)
place later.

   Here is the list of commands for killing text.

C-k
     Kill the text from the current cursor position to the end of the
     line.

M-d
     Kill from the cursor to the end of the current word, or if between
     words, to the end of the next word.

M-DEL
     Kill from the cursor to the start of the previous word, or if
     between words, to the start of the previous word.

C-w
     Kill from the cursor to the previous whitespace.  This is
     different than M-DEL because the word boundaries differ.

   And, here is how to "yank" the text back into the line.  Yanking is

C-y
     Yank the most recently killed text back into the buffer at the
     cursor.

M-y
     Rotate the kill-ring, and yank the new top.  You can only do this
     if the prior command is C-y or M-y.

   When you use a kill command, the text is saved in a "kill-ring".
Any number of consecutive kills save all of the killed text together, so
that when you yank it back, you get it in one clean sweep.  The kill
ring is not line specific; the text that you killed on a previously
typed line is available to be yanked back later, when you are typing
another line.


File: octave.info,  Node: Readline Arguments,  Prev: Readline Killing Commands,  Up: Readline Interaction

Readline Arguments
------------------

   You can pass numeric arguments to Readline commands.  Sometimes the
argument acts as a repeat count, other times it is the sign of the
argument that is significant.  If you pass a negative argument to a
command which normally acts in a forward direction, that command will
act in a backward direction.  For example, to kill text back to the
start of the line, you might type M- C-k.

   The general way to pass numeric arguments to a command is to type
meta digits before the command.  If the first `digit' you type is a
minus sign (-), then the sign of the argument will be negative.  Once
you have typed one meta digit to get the argument started, you can type
the remainder of the digits, and then the command.  For example, to give
the C-d command an argument of 10, you could type M-1 0 C-d.


File: octave.info,  Node: Readline Init File,  Prev: Readline Interaction,  Up: Command Line Editing

Readline Init File
==================

   Although the Readline library comes with a set of Emacs-like
keybindings, it is possible that you would like to use a different set
of keybindings.  You can customize programs that use Readline by putting
commands in an "init" file in your home directory.  The name of this
file is `~/.inputrc'.

   When a program which uses the Readline library starts up, the
`~/.inputrc' file is read, and the keybindings are set.

   In addition, the C-x C-r command re-reads this init file, thus
incorporating any changes that you might have made to it.

* Menu:

* Readline Init Syntax::        Syntax for the commands in `~/.inputrc'.
* Readline Vi Mode::            Switching to `vi' mode in Readline.


File: octave.info,  Node: Readline Init Syntax,  Next: Readline Vi Mode,  Up: Readline Init File

Readline Init Syntax
--------------------

   There are only four constructs allowed in the `~/.inputrc' file:

Variable Settings
     You can change the state of a few variables in Readline.  You do
     this by using the `set' command within the init file.  Here is how
     you would specify that you wish to use Vi line editing commands:

          set editing-mode vi

     Right now, there are only a few variables which can be set; so few
     in fact, that we just iterate them here:

    `editing-mode'
          The `editing-mode' variable controls which editing mode you
          are using.  By default, GNU Readline starts up in Emacs
          editing mode, where the keystrokes are most similar to Emacs.
          This variable can either be set to `emacs' or `vi'.

    `horizontal-scroll-mode'
          This variable can either be set to `On' or `Off'.  Setting it
          to `On' means that the text of the lines that you edit will
          scroll horizontally on a single screen line when they are
          larger than the width of the screen, instead of wrapping onto
          a new screen line.  By default, this variable is set to `Off'.

    `mark-modified-lines'
          This variable when set to `On', says to display an asterisk
          (`*') at the starts of history lines which have been modified.
          This variable is off by default.

    `prefer-visible-bell'
          If this variable is set to `On' it means to use a visible
          bell if one is available, rather than simply ringing the
          terminal bell.  By default, the value is `Off'.

Key Bindings
     The syntax for controlling keybindings in the `~/.inputrc' file is
     simple.  First you have to know the name of the command that you
     want to change.  The following pages contain tables of the command
     name, the default keybinding, and a short description of what the
     command does.

     Once you know the name of the command, simply place the name of
     the key you wish to bind the command to, a colon, and then the
     name of the command on a line in the `~/.inputrc' file.  The name
     of the key can be expressed in different ways, depending on which
     is most comfortable for you.

    KEYNAME: FUNCTION-NAME or MACRO
          KEYNAME is the name of a key spelled out in English.  For
          example:
               Control-u: universal-argument
               Meta-Rubout: backward-kill-word
               Control-o: ">&output"

          In the above example, C-u is bound to the function
          `universal-argument', and C-o is bound to run the macro
          expressed on the right hand side (that is, to insert the text
          `>&output' into the line).

    "KEYSEQ": FUNCTION-NAME or MACRO
          KEYSEQ differs from KEYNAME above in that strings denoting an
          entire key sequence can be specified.  Simply place the key
          sequence in double quotes.  GNU Emacs style key escapes can
          be used, as in the following example:

               "\C-u": universal-argument
               "\C-x\C-r": re-read-init-file
               "\e[11~": "Function Key 1"

          In the above example, C-u is bound to the function
          `universal-argument' (just as it was in the first example),
          C-x C-r is bound to the function `re-read-init-file', and ESC
          [ 1 1 ~ is bound to insert the text `Function Key 1'.

* Menu:

* Commands For Moving::         Moving about the line.
* Commands For History::        Getting at previous lines.
* Commands For Text::           Commands for changing text.
* Commands For Killing::        Commands for killing and yanking.
* Numeric Arguments::           Specifying numeric arguments, repeat counts.
* Commands For Completion::     Getting Readline to do the typing for you.
* Miscellaneous Commands::      Other miscellaneous commands.


File: octave.info,  Node: Commands For Moving,  Next: Commands For History,  Up: Readline Init Syntax

Commands For Moving
-------------------

`beginning-of-line (C-a)'
     Move to the start of the current line.

`end-of-line (C-e)'
     Move to the end of the line.

`forward-char (C-f)'
     Move forward a character.

`backward-char (C-b)'
     Move back a character.

`forward-word (M-f)'
     Move forward to the end of the next word.

`backward-word (M-b)'
     Move back to the start of this, or the previous, word.

`clear-screen (C-l)'
     Clear the screen leaving the current line at the top of the screen.


File: octave.info,  Node: Commands For History,  Next: Commands For Text,  Prev: Commands For Moving,  Up: Readline Init Syntax

Commands For Manipulating The History
-------------------------------------

`accept-line (Newline, Return)'
     Accept the line regardless of where the cursor is.  If this line is
     non-empty, add it to the history list.  If this line was a history
     line, then restore the history line to its original state.

`previous-history (C-p)'
     Move `up' through the history list.

`next-history (C-n)'
     Move `down' through the history list.

`beginning-of-history (M-<)'
     Move to the first line in the history.

`end-of-history (M->)'
     Move to the end of the input history, i.e., the line you are
     entering!

`reverse-search-history (C-r)'
     Search backward starting at the current line and moving `up'
     through the history as necessary.  This is an incremental search.

`forward-search-history (C-s)'
     Search forward starting at the current line and moving `down'
     through the the history as necessary.


File: octave.info,  Node: Commands For Text,  Next: Commands For Killing,  Prev: Commands For History,  Up: Readline Init Syntax

Commands For Changing Text
--------------------------

`delete-char (C-d)'
     Delete the character under the cursor.  If the cursor is at the
     beginning of the line, and there are no characters in the line, and
     the last character typed was not C-d, then return EOF.

`backward-delete-char (Rubout)'
     Delete the character behind the cursor.  A numeric arg says to kill
     the characters instead of deleting them.

`quoted-insert (C-q, C-v)'
     Add the next character that you type to the line verbatim.  This is
     how to insert things like C-q for example.

`tab-insert (M-TAB)'
     Insert a tab character.

`self-insert (a, b, A, 1, !, ...)'
     Insert yourself.

`transpose-chars (C-t)'
     Drag the character before point forward over the character at
     point.  Point moves forward as well.  If point is at the end of
     the line, then transpose the two characters before point.
     Negative args don't work.

`transpose-words (M-t)'
     Drag the word behind the cursor past the word in front of the
     cursor moving the cursor over that word as well.

`upcase-word (M-u)'
     Uppercase the current (or following) word.  With a negative
     argument, do the previous word, but do not move point.

`downcase-word (M-l)'
     Lowercase the current (or following) word.  With a negative
     argument, do the previous word, but do not move point.

`capitalize-word (M-c)'
     Uppercase the current (or following) word.  With a negative
     argument, do the previous word, but do not move point.


File: octave.info,  Node: Commands For Killing,  Next: Numeric Arguments,  Prev: Commands For Text,  Up: Readline Init Syntax

Killing And Yanking
-------------------

`kill-line (C-k)'
     Kill the text from the current cursor position to the end of the
     line.

`backward-kill-line ()'
     Kill backward to the beginning of the line.  This is normally
     unbound.

`kill-word (M-d)'
     Kill from the cursor to the end of the current word, or if between
     words, to the end of the next word.

`backward-kill-word (M-DEL)'
     Kill the word behind the cursor.

`unix-line-discard (C-u)'
     Do what C-u used to do in Unix line input.  We save the killed
     text on the kill-ring, though.

`unix-word-rubout (C-w)'
     Do what C-w used to do in Unix line input.  The killed text is
     saved on the kill-ring.  This is different than backward-kill-word
     because the word boundaries differ.

`yank (C-y)'
     Yank the top of the kill ring into the buffer at point.

`yank-pop (M-y)'
     Rotate the kill-ring, and yank the new top.  You can only do this
     if the prior command is yank or yank-pop.


File: octave.info,  Node: Numeric Arguments,  Next: Commands For Completion,  Prev: Commands For Killing,  Up: Readline Init Syntax

Specifying Numeric Arguments
----------------------------

`digit-argument (M-0, M-1, ... M--)'
     Add this digit to the argument already accumulating, or start a new
     argument.  M- starts a negative argument.

`universal-argument ()'
     Do what C-u does in emacs.  By default, this is not bound.


File: octave.info,  Node: Commands For Completion,  Next: Miscellaneous Commands,  Prev: Numeric Arguments,  Up: Readline Init Syntax

Letting Readline Type For You
-----------------------------

`complete (TAB)'
     Attempt to do completion on the text before point.  This is
     implementation defined.  Generally, if you are typing a filename
     argument, you can do filename completion; if you are typing a
     command, you can do command completion, if you are typing in a
     symbol to GDB, you can do symbol name completion, if you are
     typing in a variable to Bash, you can do variable name
     completion...

`possible-completions (M-?)'
     List the possible completions of the text before point.


File: octave.info,  Node: Miscellaneous Commands,  Prev: Commands For Completion,  Up: Readline Init Syntax

Some Miscellaneous Commands
---------------------------

`re-read-init-file (C-x C-r)'
     Read in the contents of your `~/.inputrc' file, and incorporate
     any bindings found there.

`abort (C-g)'
     Ding!  Stops things.

`do-uppercase-version (M-a, M-b, ...)'
     Run the command that is bound to your uppercase brother.

`prefix-meta (ESC)'
     Make the next character that you type be metafied.  This is for
     people without a meta key.  Typing ESC f is equivalent to typing
     M-f.

`undo (C-_)'
     Incremental undo, separately remembered for each line.

`revert-line (M-r)'
     Undo all changes made to this line.  This is like typing the `undo'
     command enough times to get back to the beginning.


File: octave.info,  Node: Readline Vi Mode,  Prev: Readline Init Syntax,  Up: Readline Init File

Readline Vi Mode
----------------

   While the Readline library does not have a full set of Vi editing
functions, it does contain enough to allow simple editing of the line.

   In order to switch interactively between Emacs and Vi editing modes,
use the command M-C-j (toggle-editing-mode).

   When you enter a line in Vi mode, you are already placed in
`insertion' mode, as if you had typed an `i'.  Pressing ESC switches
you into `edit' mode, where you can edit the text of the line with the
standard Vi movement keys, move to previous history lines with `k', and
following lines with `j', and so forth.


File: octave.info,  Node: Installation,  Next: Trouble,  Prev: Command Line Editing,  Up: Top

Installing Octave
*****************

   Here is the procedure for installing Octave from scratch on a Unix
system.  For instructions on how to install the binary distributions of
Octave, see *Note Binary Distributions::.

   * Run the shell script `configure'.  This will determine the features
     your system has (or doesn't have) and create a file named Makefile
     from each of the files named Makefile.in.

     See the file INSTALL for more information about the command line
     options used by configure.  That file also contains instructions
     for compiling in a directory other than where the source is
     located.

   * Run make.

     You will need the latest version of GNU make.  Modifying Octave's
     Makefiles to work with other `make' programs is probably not worth
     your time.  We recommend you get and compile GNU make instead.

     For plotting, you will need to have gnuplot installed on your
     system.  Gnuplot is a command-driven interactive function plotting
     program.  Gnuplot is copyrighted, but freely distributable.  The
     `gnu' in gnuplot is a coincidence--it is not related to the GNU
     project or the FSF in any but the most peripheral sense.

     You will probably also need the GNU C and C++ compiler (gcc) and
     the GNU C++ class library (libg++).

     GNU make, gcc, and libg++, and gnuplot are all available from many
     anonymous ftp archives, including ftp.che.utexas.edu, ftp.uu.net,
     prep.ai.mit.edu, and wuarchive.wustl.edu.

     If you don't have a Fortran compiler, or if your Fortran compiler
     doesn't work like the traditional Unix f77, you will need to have
     the Fortran to C translator f2c.  You can get f2c from any number
     of anonymous ftp archives.  The most recent version of f2c is
     always available from research.att.com.

     On an otherwise idle SPARCstation II, it will take somewhere
     between 60 and 90 minutes to compile everything, depending on
     whether you are compiling the Fortran libraries with f2c or using
     the Fortran compiler directly.  You will need about 25 megabytes
     of disk storage to work with (considerably less if you don't
     compile with debugging symbols).  To do that, use the command

          make CFLAGS=-O CXXFLAGS=-O LDFLAGS=

     instead of just `make'.

   * If all goes well, run `make install'.

     This will install a copy of octave, its libraries, and its
     documentation in the destination directory.  As distributed, the
     octave binary is installed in the directory `/usr/local/bin',
     other related files are installed in the directory
     `/usr/local/lib/octave', and the Info file in the directory
     `/usr/local/lib/info'. You can specify a top-level directory other
     than `/usr/local' by running configure with the `--prefix=dir'
     option.  See the file INSTALL for more information.

   * Octave has been compiled and tested with gcc-2.4.2 and
     libg++-2.3.1 on a SPARCstation 2 running SunOS 4.1.2, an IBM
     RS/6000 running AIX 3.2, and a DECstation 5000/240 running Ultrix
     4.2a.  It is probably not very hard to port it to other Unix-like
     systems that run GCC.

* Menu:

* Binary Distributions::


File: octave.info,  Node: Binary Distributions,  Up: Installation

Binary Distributions
====================

   This section constains instructions for creating a and installing a
binary distribution.

* Menu:

* Installing Octave from a Binary Distribution::
* Creating a Binary Distribution::


File: octave.info,  Node: Installing Octave from a Binary Distribution,  Next: Creating a Binary Distribution,  Up: Binary Distributions

Installing Octave from a Binary Distribution
--------------------------------------------

   * To install Octave from a binary distribution, execute the command

          sh ./doinstall.sh

     in the top level directory of the distribution.

     Binary distributions are normally compiled assuming that Octave
     will be installed in subdirectories of `/usr/local'.  If this is
     not possible, or you would prefer to install it in a different
     directory, use an optional argument to the doinstall.sh script to
     specify the top level directory:

          sh ./doinstall.sh /some/other/directory

     Octave will then be installed in the following directories:

          PREFIX/bin                   -- Octave shell script and binary
          PREFIX/octave/lib/VERSION     -- M-files
          PREFIX/info                  -- Info files

     where PREFIX defaults to `/usr/local', and VERSION stands for the
     current version number of the interpreter.

     If these directories don't exist, the script `doinstall.sh' will
     create them for you.


File: octave.info,  Node: Creating a Binary Distribution,  Prev: Installing Octave from a Binary Distribution,  Up: Binary Distributions

Creating a Binary Distribution
------------------------------

   Here is how to build a binary distribution for others.

   * Build Octave in same directory as source.  This is required since
     the `binary-dist' targets in the Makefiles will not work if you
     compile outside the source tree.

   * Use `CFLAGS=-O CXXFLAGS=-O LDFLAGS=' as arguments for Make because
     most people who get the binary distributions are probably not
     going to be interested in debugging Octave.

   * Type `make binary-dist'.  This will build everything and then pack
     it up for distribution.


File: octave.info,  Node: Trouble,  Next: Concept Index,  Prev: Installation,  Up: Top

Known Causes of Trouble with Octave
***********************************

   This section describes known problems that affect users of Octave.
Most of these are not Octave bugs per se--if they were, we would fix
them.  But the result for a user may be like the result of a bug.

   Some of these problems are due to bugs in other software, some are
missing features that are too much work to add, and some are places
where people's opinions differ as to what is best.

* Menu:

* Actual Bugs::                 Bugs we will fix later.
* Installation Problems::       Problems that manifest when you install Octave.
* Disappointments::             Regrettable things we can't change.
* Reporting Bugs::
* Bug Criteria::
* Bug Lists::
* Bug Reporting::
* Sending Patches::
* Service::


File: octave.info,  Node: Actual Bugs,  Next: Installation Problems,  Up: Trouble

Actual Bugs We Haven't Fixed Yet
================================

   * Recursive function calls are not currently allowed.


File: octave.info,  Node: Installation Problems,  Next: Disappointments,  Prev: Actual Bugs,  Up: Trouble

Installation Problems
=====================

   This is a list of problems (and some apparent problems which don't
really mean anything is wrong) that may show up during installation of
Octave.

   * Problems with finite and isinf on systems that don't have `isinf()'
     but do have `finite()'.

     The copy of `math.h' supplied with libg++ version 2.3 (and possibly
     other versions as well) declares `finite()' as
          double finite (double);
     even though some (many? all?) systems declare it as
          int finite (double);

     If the copy of `math.h' from libg++ was installed, you should edit
     it so that the libg++ declaration of `finite()' matches the
     system's.

   * Problems compiling octave.cc on RS/6000 (and possibly other)
     systems:

     If octave.cc fails to compile due to parse errors in system include
     files and undeclared subroutines like `gethostname' and `endpwent',
     it is probably because not all of the libg++ include files have
     been installed.  This appears to be a problem with libg++ version
     2.3.  Here's a fix:

     Apply the following patch to `libg++/config/rs6000.mh' and re-run
     make install for libg++.

          *** rs6000.mh~  Mon Aug 17 19:18:44 1992
          --- rs6000.mh   Mon Dec 28 23:54:57 1992
          ***************
          *** 3,6 ****
            # /usr/include/unistd.h has write(int, char*, unsigned) instead
            # of write(int, const void*, size_t).  This causes problems due
            # to g++ new pedantic dis-allowal of void* -> char* conversions.
          ! G_CONFIG_ARGS = "HAVE_UNISTD=0 /*broken*/"
          \ No newline at end of file
          --- 3,11 ----
            # /usr/include/unistd.h has write(int, char*, unsigned) instead
            # of write(int, const void*, size_t).  This causes problems due
            # to g++ new pedantic dis-allowal of void* -> char* conversions.
          ! G_CONFIG_ARGS = "HAVE_UNISTD=0 /*broken*/"
          !
          ! # If the C include files are C++-ready (with extern "C"),
          ! # define: HAVE_CPLUS_EXTERN = 1 and: WRAP_C_INCLUDES =
          ! # If not, define HAVE_CPLUS_EXTERN = 0, and do not define WRAP_C_INCLUDES here
          .
          ! HAVE_CPLUS_EXTERN = 0

   * Lots of warnings about `control reaches end of non-void function'
     when compiling with -O.

     This appears to be a problem with g++ and the definition of an
     empty destructor in Complex.h from libg++.  Deleting the
     declaration and definition of the (unnecessary) destructor from
     Complex.h eliminates the warnings.

   * If you don't have NPSOL but you still want to be able to solve
     NLPs, or if you don't have QPSOL but you still want to solve QPs,
     you'll need to find replacements or order them from Stanford.  If
     you know of a freely redistributable replacement, please let us
     know--we might be interested in distributing it with Octave.

     You can get more information about NPSOL and QPSOL from

          Stanford University
          Office of Technology Licensing
          857 Serra Street
          Stanford CA 94305-6225
          Tel: (415) 723-0651
          Fax: (415) 725-7295

     Octave may soon support FSQP, an NLP solver from Andre Tits
     (andre@src.umd.edu) of the University of Maryland.  FSQP is
     available free of charge to academic sites, but can not be
     redistributed to third parties.


File: octave.info,  Node: Disappointments,  Next: Reporting Bugs,  Prev: Installation Problems,  Up: Trouble

Disappointments and Misunderstandings
=====================================

   These problems are perhaps regrettable, but we don't know any
practical way around them.


File: octave.info,  Node: Reporting Bugs,  Next: Bug Criteria,  Prev: Disappointments,  Up: Trouble

Reporting Bugs
==============

   Your bug reports play an essential role in making Octave reliable.

   When you encounter a problem, the first thing to do is to see if it
is already known.  *Note Trouble::.  If it isn't known, then you should
report the problem.

   Reporting a bug may help you by bringing a solution to your problem,
or it may not.  In any case, the principal function of a bug report is
to help the entire community by making the next version of Octave work
better.  Bug reports are your contribution to the maintenance of Octave.

   In order for a bug report to serve its purpose, you must include the
information that makes it possible to fix the bug.

* Menu:

* Bug Criteria::
* Where: Bug Lists.             Where to send your bug report.
* Reporting: Bug Reporting.     How to report a bug effectively.
* Patches: Sending Patches.     How to send a patch for Octave.


File: octave.info,  Node: Bug Criteria,  Next: Bug Lists,  Prev: Reporting Bugs,  Up: Trouble

Have You Found a Bug?
=====================

   If you are not sure whether you have found a bug, here are some
guidelines:

   * If Octave gets a fatal signal, for any input whatever, that is a
     bug.  Reliable interpreters never crash.

   * If Octave produces incorrect results, for any input whatever, that
     is a bug.

   * Some output may appear to be incorrect when it is in fact due to a
     program whose behavior is undefined, which happened by chance to
     give the desired results on another system.  For example, the
     range operator may produce different results because of
     differences in the way floating point arithmetic is handled on
     various systems.

   * If Octave produces an error message for valid input, that is a bug.

   * If Octave does not produce an error message for invalid input,
     that is a bug.  However, you should note that your idea of
     "invalid input" might be my idea of "an extension" or "support for
     traditional practice".

     suggestions

   * If you are an experienced user of programs like Octave, your
     suggestions for improvement are welcome in any case.


File: octave.info,  Node: Bug Lists,  Next: Bug Reporting,  Prev: Bug Criteria,  Up: Trouble

Where to Report Bugs
====================

   Send bug reports for Octave to:

     bug-octave@che.utexas.edu

   *Do not send bug reports to `help-octave'*.  Most users of Octave do
not want to receive bug reports.  Those that do, have asked to be on
`bug-octave'.

   As a last resort, send bug reports on paper to:

     Octave Bugs c/o John W. Eaton
     Department of Chemical Engineering
     The University of Texas at Austin
     Austin, Texas 78712

