home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / info / octave.info-1 < prev    next >
Encoding:
GNU Info File  |  1996-10-12  |  49.3 KB  |  1,341 lines

  1. This is Info file octave.info, produced by Makeinfo-1.64 from the input
  2. file octave.texi.
  3.  
  4.    Copyright (C) 1993, 1994, 1995 John W. Eaton.
  5.  
  6.    Permission is granted to make and distribute verbatim copies of this
  7. manual provided the copyright notice and this permission notice are
  8. preserved on all copies.
  9.  
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided that
  12. the entire resulting derived work is distributed under the terms of a
  13. permission notice identical to this one.
  14.  
  15.    Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions.
  18.  
  19. 
  20. File: octave.info,  Node: Top,  Next: Preface,  Prev: (dir),  Up: (dir)
  21.  
  22.  
  23.  
  24.    This manual documents how to run, install and port Octave, as well as
  25. its new features and incompatibilities, and how to report bugs.  It
  26. corresponds to Octave version 1.1.1.
  27.  
  28. * Menu:
  29.  
  30. * Preface::
  31. * Copying::
  32. * Introduction::                A brief introduction to Octave.
  33. * Invoking Octave::             Command options supported by Octave.
  34. * Expressions::                 Expressions.
  35. * Statements::                  Looping and program flow control.
  36. * Functions and Scripts::
  37. * Built-in Variables::          Descriptions of all built-in variables.
  38. * Arithmetic::
  39. * Linear Algebra::
  40. * Polynomial Manipulations::
  41. * Nonlinear Equations::
  42. * Differential Equations::
  43. * Optimization::
  44. * Quadrature::
  45. * Control Theory::
  46. * Signal Processing::
  47. * Sets::
  48. * Statistics::
  49. * Plotting::
  50. * Image Processing::
  51. * Input and Output::
  52. * Special Matrices::
  53. * Matrix Manipulation::
  54. * String Functions::
  55. * System Utilities::
  56. * Command History Functions::
  57. * Help::
  58. * Programming Utilities::
  59. * Amusements::
  60. * Installation::                How to configure, compile and install Octave.
  61. * Trouble::                     If you have trouble installing Octave.
  62. * Command Line Editing::        Command history and editing.
  63. * Using Info::
  64. * Concept Index::               An item for each concept.
  65. * Variable Index::              An item for each documented variable.
  66. * Function Index::              An item for each documented function.
  67. * Operator Index::              An item for each documented operator.
  68. * Readline Index::              An index for readline commands.
  69. * Info Index::                  An index for info commands.
  70.  
  71.  -- The Detailed Node Listing --
  72.  
  73. A Brief Introduction to Octave
  74.  
  75. * Running Octave::
  76. * Simple Examples::
  77. * Executable Octave Programs::
  78. * Comments::
  79. * Errors::
  80.  
  81. Invoking Octave
  82.  
  83. * Command Line Options::
  84. * Startup Files::
  85.  
  86. Expressions
  87.  
  88. * Constant Expressions::
  89. * Matrices::
  90. * Ranges::
  91. * Variables::
  92. * Index Expressions::
  93. * Data Structures::
  94. * Calling Functions::
  95. * Global Variables::
  96. * Keywords::
  97. * Arithmetic Ops::
  98. * Comparison Ops::
  99. * Boolean Expressions::
  100. * Assignment Ops::
  101. * Increment Ops::
  102. * Operator Precedence::
  103.  
  104. Constant Expressions
  105.  
  106. * Numeric Constants::
  107. * String Constants::
  108.  
  109. Matrices
  110.  
  111. * Empty Matrices::
  112.  
  113. Calling Functions
  114.  
  115. * Call by Value::
  116. * Recursion::
  117.  
  118. Boolean Expressions
  119.  
  120. * Element-by-element Boolean Operators::
  121. * Short-circuit Boolean Operators::
  122.  
  123. Statements
  124.  
  125. * The if Statement::
  126. * The while Statement::
  127. * The for Statement::
  128. * The break Statement::
  129. * The continue Statement::
  130. * The unwind_protect Statement::
  131.  
  132. Functions and Script Files
  133.  
  134. * Defining Functions::
  135. * Multiple Return Values::
  136. * Variable-length Argument Lists::
  137. * Variable-length Return Lists::
  138. * Returning From a Function::
  139. * Function Files::
  140. * Script Files::
  141. * Dynamically Linked Functions::
  142. * Organization of Functions::
  143.  
  144. Built-in Variables
  145.  
  146. * Predefined Constants::
  147. * User Preferences::
  148. * Other Built-in Variables::
  149. * Summary of Preference Variables::
  150.  
  151. Arithmetic
  152.  
  153. * Utility Functions::
  154. * Complex Arithmetic::
  155. * Trigonometry::
  156. * Sums and Products::
  157. * Special Functions::
  158.  
  159. Linear Algebra
  160.  
  161. * Basic Matrix Functions::
  162. * Matrix Factorizations::
  163. * Functions of a Matrix::
  164.  
  165. Differential Equations
  166.  
  167. * Ordinary Differential Equations::
  168. * Differential-Algebraic Equations::
  169.  
  170. Optimization
  171.  
  172. * Quadratic Programming::
  173. * Nonlinear Programming::
  174. * Linear Least Squares::
  175.  
  176. Quadrature
  177.  
  178. * Functions of one Variable::
  179. * Orthogonal Collocation::
  180.  
  181. Plotting
  182.  
  183. * Two-Dimensional Plotting::
  184. * Three-Dimensional Plotting::
  185. * Miscellaneous Plotting Functions::
  186.  
  187. Input and Output
  188.  
  189. * Basic Input and Output::
  190. * C-Style I/O Functions::
  191.  
  192. C-Style I/O Functions
  193.  
  194. * Opening and Closing Files::
  195. * Formatted Output::
  196. * Output Conversion Syntax::
  197. * Table of Output Conversions::
  198. * Integer Conversions::
  199. * Floating-Point Conversions::
  200. * Other Output Conversions::
  201. * Formatted Input::
  202. * Input Conversion Syntax::
  203. * Table of Input Conversions::
  204. * Numeric Input Conversions::
  205. * String Input Conversions::
  206. * Binary I/O::
  207. * Other I/O Functions::
  208.  
  209. Special Matrices
  210.  
  211. * Special Utility Matrices::
  212. * Famous Matrices::
  213.  
  214. Matrix Manipulation
  215.  
  216. * Finding Elements and Checking Conditions::
  217. * Rearranging Matrices::
  218.  
  219. System Utilities
  220.  
  221. * Timing Utilities::
  222. * Interacting with the OS::
  223. * System Information::
  224. * Other Functions::
  225.  
  226. Programming Utilities
  227.  
  228. * Evaluating Strings as Commands::
  229. * Miscellaneous Utilities::
  230.  
  231. Installing Octave
  232.  
  233. * Installation Problems::
  234. * Binary Distributions::
  235.  
  236. Binary Distributions
  237.  
  238. * Installing Octave from a Binary Distribution::
  239. * Creating a Binary Distribution::
  240.  
  241. Known Causes of Trouble with Octave
  242.  
  243. * Actual Bugs::                 Bugs we will fix later.
  244. * Reporting Bugs::
  245. * Bug Criteria::
  246. * Bug Lists::
  247. * Bug Reporting::
  248. * Sending Patches::
  249. * Service::
  250.  
  251. Reporting Bugs
  252.  
  253. * Bug Criteria::
  254. * Where: Bug Lists.             Where to send your bug report.
  255. * Reporting: Bug Reporting.     How to report a bug effectively.
  256. * Patches: Sending Patches.     How to send a patch for Octave.
  257.  
  258. Command Line Editing
  259.  
  260. * Introduction and Notation::   Notation used in this text.
  261. * Readline Interaction::        The minimum set of commands for editing a line.
  262. * Readline Bare Essentials::
  263. * Readline Movement Commands::
  264. * Readline Killing Commands::
  265. * Readline Arguments::
  266. * Readline Init File::          Customizing Readline from a user's view.
  267. * Readline Init Syntax::
  268. * Readline Vi Mode::
  269.  
  270. Readline Interaction
  271.  
  272. * Readline Bare Essentials::    The least you need to know about Readline.
  273. * Readline Movement Commands::  Moving about the input line.
  274. * Readline Killing Commands::   How to delete text, and how to get it back!
  275. * Readline Arguments::          Giving numeric arguments to commands.
  276.  
  277. Readline Init File
  278.  
  279. * Readline Init Syntax::        Syntax for the commands in `~/.inputrc'.
  280. * Readline Vi Mode::            Switching to `vi' mode in Readline.
  281.  
  282. Readline Init Syntax
  283.  
  284. * Commands For Moving::         Moving about the line.
  285. * Commands For History::        Getting at previous lines.
  286. * Commands For Text::           Commands for changing text.
  287. * Commands For Killing::        Commands for killing and yanking.
  288. * Numeric Arguments::           Specifying numeric arguments, repeat counts.
  289. * Commands For Completion::     Getting Readline to do the typing for you.
  290. * Miscellaneous Commands::      Other miscellaneous commands.
  291.  
  292. Using Info
  293.  
  294. * Cursor Commands::
  295. * Scrolling Commands::
  296. * Node Commands::
  297. * Searching Commands::
  298. * Xref Commands::
  299. * Window Commands::
  300. * Printing Nodes::
  301. * Other Info Commands::
  302. * Info Variables::
  303.  
  304. Using Info
  305.  
  306. * Cursor Commands::        Commands which move the cursor within a node.
  307. * Scrolling Commands::        Commands for moving the node around in a window.
  308. * Node Commands::        Commands for selecting a new node.
  309. * Searching Commands::        Commands for searching an info file.
  310. * Xref Commands::        Commands for selecting cross references.
  311. * Window Commands::        Commands which manipulate multiple windows.
  312. * Printing Nodes::        How to print out the contents of a node.
  313. * Other Info Commands::     A few commands that defy categories.
  314. * Info Variables::        How to change the default behavior of Info.
  315.  
  316. Selecting Cross References
  317.  
  318. * Parts of an Xref::            What a cross reference is made of.
  319. * Selecting Xrefs::             Commands for selecting menu or note items.
  320.  
  321. Manipulating Multiple Windows
  322.  
  323. * The Mode Line::               What appears in the mode line?
  324. * Basic Windows::               Manipulating windows in Info.
  325. * The Echo Area::               Used for displaying errors and reading input.
  326.  
  327. 
  328. File: octave.info,  Node: Preface,  Next: Copying,  Prev: Top,  Up: Top
  329.  
  330. Preface
  331. *******
  332.  
  333.    Octave was originally intended to be companion software for an
  334. undergraduate-level textbook on chemical reactor design being written by
  335. James B. Rawlings and John G. Ekerdt at the University of Texas.
  336.  
  337.    Clearly, Octave is now much more than just another `courseware'
  338. package with limited utiltiy beyond the classroom.  Although our
  339. initial goals were somewhat vague, we knew that we wanted to create
  340. something that would enable students to solve realistic problems, and
  341. that they could use for many things other than chemical reactor design
  342. problems.
  343.  
  344.    There are those who would say that we should be teaching the students
  345. Fortran instead, because that is the computer language of engineering,
  346. but every time we have tried that, the students have spent far too much
  347. time trying to figure out why their Fortran code crashes and not enough
  348. time learning about chemical engineering.  With Octave, most students
  349. pick up the basics quickly, and are using it confidently in just a few
  350. hours.
  351.  
  352.    Although it was originally intended to be used to teach reactor
  353. design, it is also currently used in several other undergraduate and
  354. graduate courses in our department, and the math department at the
  355. University of Texas has been using it for teaching differential
  356. equations and linear algebra as well.  If you find it useful, please
  357. let us know.  We are always interested to find out how Octave is being
  358. used in other places.
  359.  
  360.    Virtually everyone thinks that the name Octave has something to do
  361. with music, but it is actually the name of a former professor of mine
  362. who wrote a famous textbook on chemical reaction engineering, and who
  363. was also well known for his ability to do quick `back of the envelope'
  364. calculations.  We hope that this software will make it possible for many
  365. people to do more ambitious computations just as easily.
  366.  
  367.    Everyone is encouraged to share this software with others under the
  368. terms of the GNU General Public License (*note Copying::.) as described
  369. at the beginning of this manual.  You are also encouraged to help make
  370. Octave more useful by writing and contributing additional functions for
  371. it, and by reporting any problems you may have.
  372.  
  373.    Many people have already contributed to Octave's development.  In
  374. addition to John W. Eaton, the following people have helped write parts
  375. of Octave or helped out in various other ways.
  376.  
  377.    * Karl Berry (karl@cs.umb.edu) wrote the `kpathsea' library that
  378.      allows Octave to recursively search directory paths for function
  379.      and script files.
  380.  
  381.    * Georg Beyerle (gbeyerle@awi-potsdam.de) contributed code to save
  382.      values in MATLAB's `.mat'-file format, and has provided many
  383.      useful bug reports and suggestions.
  384.  
  385.    * John Campbell (jcc@che.utexas.edu) wrote most of the file and
  386.      C-style input and output functions.
  387.  
  388.    * Brian Fox (bfox@gnu.ai.mit.edu) wrote the `readline' library used
  389.      for command history editing, and the portion of this manual that
  390.      documents it.
  391.  
  392.    * A. Scottedward Hodel (scotte@eng.auburn.edu) contributed a number
  393.      of functions including `expm', `qzval', `qzhess', `syl', `lyap',
  394.      and `balance'.
  395.  
  396.    * Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at) provided the `corrcoef',
  397.      `cov', `kurtosis', `pinv', and `skewness' functions.
  398.  
  399.    * Phil Johnson (johnsonp@nicco.sscnet.ucla.edu) has helped to make
  400.      Linux releases available.
  401.  
  402.    * Friedrich Leisch (leisch@ci.tuwien.ac.at) provided the
  403.      `mahalanobis' function.
  404.  
  405.    * Ken Neighbors (wkn@leland.stanford.edu) has provided many useful
  406.      bug reports and comments on MATLAB compatibility.
  407.  
  408.    * Rick Niles (niles@axp745.gsfc.nasa.gov) rewrote Octave's plotting
  409.      functions to add line styles and the ability to specify an
  410.      unlimited number of lines in a single call.  He also continues to
  411.      track down odd incompatibilities and bugs.
  412.  
  413.    * Mark Odegard (meo@sugarland.unocal.com) provided the initial
  414.      implementation of `fread', `fwrite', `feof', and `ferror'.
  415.  
  416.    * Tony Richardson (tony@guts.biomed.uakron.edu) wrote Octave's image
  417.      processing functions as well as most of the original polynomial
  418.      functions.
  419.  
  420.    * R. Bruce Tenison (Bruce.Tenison@eng.auburn.edu) wrote the `hess'
  421.      and `schur' functions.
  422.  
  423.    * Teresa Twaroch (twaroch@ci.tuwien.ac.at) provided the functions
  424.      `gls' and `ols'.
  425.  
  426.    * Fook Fah Yap (ffy@eng.cam.ac.uk) provided the `fft' and `ifft'
  427.      functions and valuable bug reports for early versions.
  428.  
  429.    Special thanks to the following people and organizations for
  430. supporting the development of Octave:
  431.  
  432.    * Digital Equipment Corporation, for an equipment grant as part of
  433.      their External Research Program.
  434.  
  435.    * Sun Microsystems, Inc., for an Academic Equipment grant.
  436.  
  437.    * Texaco Chemical Company, for providing funding to continue the
  438.      development of this software.
  439.  
  440.    * The University of Texas College of Engineering, for providing a
  441.      Challenge for Excellence Research Supplement, and for providing an
  442.      Academic Development Funds grant.
  443.  
  444.    * The State of Texas, for providing funding through the Texas
  445.      Advanced Technology Program under Grant No. 003658-078.
  446.  
  447.    * Noel Bell, Senior Engineer, Texaco Chemical Company, Austin Texas.
  448.  
  449.    * James B. Rawlings, Associate Professor, Department of Chemical
  450.      Engineering, The University of Texas at Austin.
  451.  
  452.    * Richard Stallman, for writing GNU.
  453.  
  454.    Portions of this document have been adapted from the `gawk',
  455. `readline', `gcc', and C library manuals, published by the Free
  456. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  457.  
  458.    This project would not have been possible without the GNU software
  459. used in and used to produce Octave.
  460.  
  461. 
  462. File: octave.info,  Node: Copying,  Next: Introduction,  Prev: Preface,  Up: Top
  463.  
  464. GNU GENERAL PUBLIC LICENSE
  465. **************************
  466.  
  467.                          Version 2, June 1991
  468.  
  469.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  470.      675 Mass Ave, Cambridge, MA 02139, USA
  471.      
  472.      Everyone is permitted to copy and distribute verbatim copies
  473.      of this license document, but changing it is not allowed.
  474.  
  475. Preamble
  476. ========
  477.  
  478.    The licenses for most software are designed to take away your
  479. freedom to share and change it.  By contrast, the GNU General Public
  480. License is intended to guarantee your freedom to share and change free
  481. software--to make sure the software is free for all its users.  This
  482. General Public License applies to most of the Free Software
  483. Foundation's software and to any other program whose authors commit to
  484. using it.  (Some other Free Software Foundation software is covered by
  485. the GNU Library General Public License instead.)  You can apply it to
  486. your programs, too.
  487.  
  488.    When we speak of free software, we are referring to freedom, not
  489. price.  Our General Public Licenses are designed to make sure that you
  490. have the freedom to distribute copies of free software (and charge for
  491. this service if you wish), that you receive source code or can get it
  492. if you want it, that you can change the software or use pieces of it in
  493. new free programs; and that you know you can do these things.
  494.  
  495.    To protect your rights, we need to make restrictions that forbid
  496. anyone to deny you these rights or to ask you to surrender the rights.
  497. These restrictions translate to certain responsibilities for you if you
  498. distribute copies of the software, or if you modify it.
  499.  
  500.    For example, if you distribute copies of such a program, whether
  501. gratis or for a fee, you must give the recipients all the rights that
  502. you have.  You must make sure that they, too, receive or can get the
  503. source code.  And you must show them these terms so they know their
  504. rights.
  505.  
  506.    We protect your rights with two steps: (1) copyright the software,
  507. and (2) offer you this license which gives you legal permission to copy,
  508. distribute and/or modify the software.
  509.  
  510.    Also, for each author's protection and ours, we want to make certain
  511. that everyone understands that there is no warranty for this free
  512. software.  If the software is modified by someone else and passed on, we
  513. want its recipients to know that what they have is not the original, so
  514. that any problems introduced by others will not reflect on the original
  515. authors' reputations.
  516.  
  517.    Finally, any free program is threatened constantly by software
  518. patents.  We wish to avoid the danger that redistributors of a free
  519. program will individually obtain patent licenses, in effect making the
  520. program proprietary.  To prevent this, we have made it clear that any
  521. patent must be licensed for everyone's free use or not licensed at all.
  522.  
  523.    The precise terms and conditions for copying, distribution and
  524. modification follow.
  525.  
  526.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  527.  
  528.   0. This License applies to any program or other work which contains a
  529.      notice placed by the copyright holder saying it may be distributed
  530.      under the terms of this General Public License.  The "Program",
  531.      below, refers to any such program or work, and a "work based on
  532.      the Program" means either the Program or any derivative work under
  533.      copyright law: that is to say, a work containing the Program or a
  534.      portion of it, either verbatim or with modifications and/or
  535.      translated into another language.  (Hereinafter, translation is
  536.      included without limitation in the term "modification".)  Each
  537.      licensee is addressed as "you".
  538.  
  539.      Activities other than copying, distribution and modification are
  540.      not covered by this License; they are outside its scope.  The act
  541.      of running the Program is not restricted, and the output from the
  542.      Program is covered only if its contents constitute a work based on
  543.      the Program (independent of having been made by running the
  544.      Program).  Whether that is true depends on what the Program does.
  545.  
  546.   1. You may copy and distribute verbatim copies of the Program's
  547.      source code as you receive it, in any medium, provided that you
  548.      conspicuously and appropriately publish on each copy an appropriate
  549.      copyright notice and disclaimer of warranty; keep intact all the
  550.      notices that refer to this License and to the absence of any
  551.      warranty; and give any other recipients of the Program a copy of
  552.      this License along with the Program.
  553.  
  554.      You may charge a fee for the physical act of transferring a copy,
  555.      and you may at your option offer warranty protection in exchange
  556.      for a fee.
  557.  
  558.   2. You may modify your copy or copies of the Program or any portion
  559.      of it, thus forming a work based on the Program, and copy and
  560.      distribute such modifications or work under the terms of Section 1
  561.      above, provided that you also meet all of these conditions:
  562.  
  563.        a. You must cause the modified files to carry prominent notices
  564.           stating that you changed the files and the date of any change.
  565.  
  566.        b. You must cause any work that you distribute or publish, that
  567.           in whole or in part contains or is derived from the Program
  568.           or any part thereof, to be licensed as a whole at no charge
  569.           to all third parties under the terms of this License.
  570.  
  571.        c. If the modified program normally reads commands interactively
  572.           when run, you must cause it, when started running for such
  573.           interactive use in the most ordinary way, to print or display
  574.           an announcement including an appropriate copyright notice and
  575.           a notice that there is no warranty (or else, saying that you
  576.           provide a warranty) and that users may redistribute the
  577.           program under these conditions, and telling the user how to
  578.           view a copy of this License.  (Exception: if the Program
  579.           itself is interactive but does not normally print such an
  580.           announcement, your work based on the Program is not required
  581.           to print an announcement.)
  582.  
  583.      These requirements apply to the modified work as a whole.  If
  584.      identifiable sections of that work are not derived from the
  585.      Program, and can be reasonably considered independent and separate
  586.      works in themselves, then this License, and its terms, do not
  587.      apply to those sections when you distribute them as separate
  588.      works.  But when you distribute the same sections as part of a
  589.      whole which is a work based on the Program, the distribution of
  590.      the whole must be on the terms of this License, whose permissions
  591.      for other licensees extend to the entire whole, and thus to each
  592.      and every part regardless of who wrote it.
  593.  
  594.      Thus, it is not the intent of this section to claim rights or
  595.      contest your rights to work written entirely by you; rather, the
  596.      intent is to exercise the right to control the distribution of
  597.      derivative or collective works based on the Program.
  598.  
  599.      In addition, mere aggregation of another work not based on the
  600.      Program with the Program (or with a work based on the Program) on
  601.      a volume of a storage or distribution medium does not bring the
  602.      other work under the scope of this License.
  603.  
  604.   3. You may copy and distribute the Program (or a work based on it,
  605.      under Section 2) in object code or executable form under the terms
  606.      of Sections 1 and 2 above provided that you also do one of the
  607.      following:
  608.  
  609.        a. Accompany it with the complete corresponding machine-readable
  610.           source code, which must be distributed under the terms of
  611.           Sections 1 and 2 above on a medium customarily used for
  612.           software interchange; or,
  613.  
  614.        b. Accompany it with a written offer, valid for at least three
  615.           years, to give any third party, for a charge no more than your
  616.           cost of physically performing source distribution, a complete
  617.           machine-readable copy of the corresponding source code, to be
  618.           distributed under the terms of Sections 1 and 2 above on a
  619.           medium customarily used for software interchange; or,
  620.  
  621.        c. Accompany it with the information you received as to the offer
  622.           to distribute corresponding source code.  (This alternative is
  623.           allowed only for noncommercial distribution and only if you
  624.           received the program in object code or executable form with
  625.           such an offer, in accord with Subsection b above.)
  626.  
  627.      The source code for a work means the preferred form of the work for
  628.      making modifications to it.  For an executable work, complete
  629.      source code means all the source code for all modules it contains,
  630.      plus any associated interface definition files, plus the scripts
  631.      used to control compilation and installation of the executable.
  632.      However, as a special exception, the source code distributed need
  633.      not include anything that is normally distributed (in either
  634.      source or binary form) with the major components (compiler,
  635.      kernel, and so on) of the operating system on which the executable
  636.      runs, unless that component itself accompanies the executable.
  637.  
  638.      If distribution of executable or object code is made by offering
  639.      access to copy from a designated place, then offering equivalent
  640.      access to copy the source code from the same place counts as
  641.      distribution of the source code, even though third parties are not
  642.      compelled to copy the source along with the object code.
  643.  
  644.   4. You may not copy, modify, sublicense, or distribute the Program
  645.      except as expressly provided under this License.  Any attempt
  646.      otherwise to copy, modify, sublicense or distribute the Program is
  647.      void, and will automatically terminate your rights under this
  648.      License.  However, parties who have received copies, or rights,
  649.      from you under this License will not have their licenses
  650.      terminated so long as such parties remain in full compliance.
  651.  
  652.   5. You are not required to accept this License, since you have not
  653.      signed it.  However, nothing else grants you permission to modify
  654.      or distribute the Program or its derivative works.  These actions
  655.      are prohibited by law if you do not accept this License.
  656.      Therefore, by modifying or distributing the Program (or any work
  657.      based on the Program), you indicate your acceptance of this
  658.      License to do so, and all its terms and conditions for copying,
  659.      distributing or modifying the Program or works based on it.
  660.  
  661.   6. Each time you redistribute the Program (or any work based on the
  662.      Program), the recipient automatically receives a license from the
  663.      original licensor to copy, distribute or modify the Program
  664.      subject to these terms and conditions.  You may not impose any
  665.      further restrictions on the recipients' exercise of the rights
  666.      granted herein.  You are not responsible for enforcing compliance
  667.      by third parties to this License.
  668.  
  669.   7. If, as a consequence of a court judgment or allegation of patent
  670.      infringement or for any other reason (not limited to patent
  671.      issues), conditions are imposed on you (whether by court order,
  672.      agreement or otherwise) that contradict the conditions of this
  673.      License, they do not excuse you from the conditions of this
  674.      License.  If you cannot distribute so as to satisfy simultaneously
  675.      your obligations under this License and any other pertinent
  676.      obligations, then as a consequence you may not distribute the
  677.      Program at all.  For example, if a patent license would not permit
  678.      royalty-free redistribution of the Program by all those who
  679.      receive copies directly or indirectly through you, then the only
  680.      way you could satisfy both it and this License would be to refrain
  681.      entirely from distribution of the Program.
  682.  
  683.      If any portion of this section is held invalid or unenforceable
  684.      under any particular circumstance, the balance of the section is
  685.      intended to apply and the section as a whole is intended to apply
  686.      in other circumstances.
  687.  
  688.      It is not the purpose of this section to induce you to infringe any
  689.      patents or other property right claims or to contest validity of
  690.      any such claims; this section has the sole purpose of protecting
  691.      the integrity of the free software distribution system, which is
  692.      implemented by public license practices.  Many people have made
  693.      generous contributions to the wide range of software distributed
  694.      through that system in reliance on consistent application of that
  695.      system; it is up to the author/donor to decide if he or she is
  696.      willing to distribute software through any other system and a
  697.      licensee cannot impose that choice.
  698.  
  699.      This section is intended to make thoroughly clear what is believed
  700.      to be a consequence of the rest of this License.
  701.  
  702.   8. If the distribution and/or use of the Program is restricted in
  703.      certain countries either by patents or by copyrighted interfaces,
  704.      the original copyright holder who places the Program under this
  705.      License may add an explicit geographical distribution limitation
  706.      excluding those countries, so that distribution is permitted only
  707.      in or among countries not thus excluded.  In such case, this
  708.      License incorporates the limitation as if written in the body of
  709.      this License.
  710.  
  711.   9. The Free Software Foundation may publish revised and/or new
  712.      versions of the General Public License from time to time.  Such
  713.      new versions will be similar in spirit to the present version, but
  714.      may differ in detail to address new problems or concerns.
  715.  
  716.      Each version is given a distinguishing version number.  If the
  717.      Program specifies a version number of this License which applies
  718.      to it and "any later version", you have the option of following
  719.      the terms and conditions either of that version or of any later
  720.      version published by the Free Software Foundation.  If the Program
  721.      does not specify a version number of this License, you may choose
  722.      any version ever published by the Free Software Foundation.
  723.  
  724.  10. If you wish to incorporate parts of the Program into other free
  725.      programs whose distribution conditions are different, write to the
  726.      author to ask for permission.  For software which is copyrighted
  727.      by the Free Software Foundation, write to the Free Software
  728.      Foundation; we sometimes make exceptions for this.  Our decision
  729.      will be guided by the two goals of preserving the free status of
  730.      all derivatives of our free software and of promoting the sharing
  731.      and reuse of software generally.
  732.  
  733.                                 NO WARRANTY
  734.  
  735.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  736.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  737.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  738.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  739.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  740.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  741.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  742.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  743.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  744.      SERVICING, REPAIR OR CORRECTION.
  745.  
  746.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  747.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  748.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  749.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  750.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  751.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  752.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  753.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  754.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  755.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  756.  
  757.                       END OF TERMS AND CONDITIONS
  758.  
  759. Appendix: How to Apply These Terms to Your New Programs
  760. =======================================================
  761.  
  762.    If you develop a new program, and you want it to be of the greatest
  763. possible use to the public, the best way to achieve this is to make it
  764. free software which everyone can redistribute and change under these
  765. terms.
  766.  
  767.    To do so, attach the following notices to the program.  It is safest
  768. to attach them to the start of each source file to most effectively
  769. convey the exclusion of warranty; and each file should have at least
  770. the "copyright" line and a pointer to where the full notice is found.
  771.  
  772.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  773.      Copyright (C) 19YY  NAME OF AUTHOR
  774.      
  775.      This program is free software; you can redistribute it and/or modify
  776.      it under the terms of the GNU General Public License as published by
  777.      the Free Software Foundation; either version 2 of the License, or
  778.      (at your option) any later version.
  779.      
  780.      This program is distributed in the hope that it will be useful,
  781.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  782.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  783.      GNU General Public License for more details.
  784.      
  785.      You should have received a copy of the GNU General Public License
  786.      along with this program; if not, write to the Free Software
  787.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  788.  
  789.    Also add information on how to contact you by electronic and paper
  790. mail.
  791.  
  792.    If the program is interactive, make it output a short notice like
  793. this when it starts in an interactive mode:
  794.  
  795.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  796.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  797.      This is free software, and you are welcome to redistribute it
  798.      under certain conditions; type `show c' for details.
  799.  
  800.    The hypothetical commands `show w' and `show c' should show the
  801. appropriate parts of the General Public License.  Of course, the
  802. commands you use may be called something other than `show w' and `show
  803. c'; they could even be mouse-clicks or menu items--whatever suits your
  804. program.
  805.  
  806.    You should also get your employer (if you work as a programmer) or
  807. your school, if any, to sign a "copyright disclaimer" for the program,
  808. if necessary.  Here is a sample; alter the names:
  809.  
  810.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  811.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  812.      
  813.      SIGNATURE OF TY COON, 1 April 1989
  814.      Ty Coon, President of Vice
  815.  
  816.    This General Public License does not permit incorporating your
  817. program into proprietary programs.  If your program is a subroutine
  818. library, you may consider it more useful to permit linking proprietary
  819. applications with the library.  If this is what you want to do, use the
  820. GNU Library General Public License instead of this License.
  821.  
  822. 
  823. File: octave.info,  Node: Introduction,  Next: Invoking Octave,  Prev: Copying,  Up: Top
  824.  
  825. A Brief Introduction to Octave
  826. ******************************
  827.  
  828.    This manual documents how to run, install and port Octave, and how
  829. to report bugs.
  830.  
  831.    Octave is a high-level language, primarily intended for numerical
  832. computations.  It provides a convenient command line interface for
  833. solving linear and nonlinear problems numerically, and for performing
  834. other numerical experiments.  It may also be used as a batch-oriented
  835. language.
  836.  
  837.    This document corresponds to Octave version 1.1.1.
  838.  
  839. * Menu:
  840.  
  841. * Running Octave::
  842. * Simple Examples::
  843. * Executable Octave Programs::
  844. * Comments::
  845. * Errors::
  846.  
  847. 
  848. File: octave.info,  Node: Running Octave,  Next: Simple Examples,  Prev: Introduction,  Up: Introduction
  849.  
  850. Running Octave
  851. ==============
  852.  
  853.    On most systems, the way to invoke Octave is with the shell command
  854. `octave'.  Octave displays an initial message and then a prompt
  855. indicating it is ready to accept input.  You can begin typing Octave
  856. commands immediately afterward.
  857.  
  858.    If you get into trouble, you can usually interrupt Octave by typing
  859. `Control-C' (usually written `C-c' for short).  `C-c' gets its name
  860. from the fact that you type it by holding down the `CTRL' key and then
  861. pressing `c'.  Doing this will normally return you to Octave's prompt.
  862.  
  863.    To exit Octave, type `quit', or `exit' at the Octave prompt.
  864.  
  865.    On systems that support job control, you can suspend Octave by
  866. sending it a `SIGTSTP' signal, usually by typing `C-z'.
  867.  
  868. 
  869. File: octave.info,  Node: Simple Examples,  Next: Executable Octave Programs,  Prev: Running Octave,  Up: Introduction
  870.  
  871. Simple Examples
  872. ===============
  873.  
  874.    The following chapters describe all of Octave's features in detail,
  875. but before doing that, it might be helpful to give a sampling of some
  876. of its capabilities.
  877.  
  878.    If you are new to Octave, I recommend that you try these examples to
  879. begin learning Octave by using it.  Lines marked with `octave:13>' are
  880. lines you type, ending each with a carriage return.  Octave will
  881. respond with an answer, or by displaying a graph.
  882.  
  883. Creating a Matrix
  884. -----------------
  885.  
  886.    To create a new matrix and store it in a variable so that it you can
  887. refer to it later, type the command
  888.  
  889.      octave:1> a = [ 1, 1, 2; 3, 5, 8; 13, 21, 34 ]
  890.  
  891. Octave will respond by printing the matrix in neatly aligned columns.
  892. Ending a command with a semicolon tells Octave to not print the result
  893. of a command.  For example
  894.  
  895.      octave:2> b = rand (3, 2);
  896.  
  897. will create a 3 row, 2 column matrix with each element set to a random
  898. value between zero and one.
  899.  
  900.    To display the value of any variable, simply type the name of the
  901. variable.  For example, to display the value stored in the matrix `b',
  902. type the command
  903.  
  904.      octave:3> b
  905.  
  906. Matrix Arithmetic
  907. -----------------
  908.  
  909.    Octave has a convenient operator notation for performing matrix
  910. arithmetic.  For example, to multiply the matrix `a' by a scalar value,
  911. type the command
  912.  
  913.      octave:4> 2 * a
  914.  
  915.    To multiply the two matrices A and B, type the command
  916.  
  917.      octave:5> a * b
  918.  
  919.    To form the matrix product  `transpose (a) * a', type the command
  920.  
  921.      octave:6> a' * a
  922.  
  923. Solving Linear Equations
  924. ------------------------
  925.  
  926.    To solve the set of linear equations `Ax = b', use the left division
  927. operator, `\':
  928.  
  929.      octave:7> a \ b
  930.  
  931. This is conceptually equivalent to inv (A) * b, but avoids computing
  932. the inverse of a matrix directly.
  933.  
  934.    If the coefficient matrix is singular, Octave will print a warning
  935. message and compute a minimum norm solution.
  936.  
  937. Integrating Differential Equations
  938. ----------------------------------
  939.  
  940.    Octave has built-in functions for solving nonlinear differential
  941. equations of the form
  942.  
  943.      dx
  944.      -- = f (x, t)
  945.      dt
  946.  
  947. with the initial condition
  948.  
  949.      x(t = t0) = x0
  950.  
  951. For Octave to integrate equations of this form, you must first provide a
  952. definition of the function `f(x,t)'.  This is straightforward, and may
  953. be accomplished by entering the function body directly on the command
  954. line.  For example, the following commands define the right hand side
  955. function for an interesting pair of nonlinear differential equations.
  956. Note that while you are entering a function, Octave responds with a
  957. different prompt, to indicate that it is waiting for you to complete
  958. your input.
  959.  
  960.      octave:8> function xdot = f (x, t)
  961.      >
  962.      >  r = 0.25;
  963.      >  k = 1.4;
  964.      >  a = 1.5;
  965.      >  b = 0.16;
  966.      >  c = 0.9;
  967.      >  d = 0.8;
  968.      >
  969.      >  xdot(1) = r*x(1)*(1 - x(1)/k) - a*x(1)*x(2)/(1 + b*x(1));
  970.      >  xdot(2) = c*a*x(1)*x(2)/(1 + b*x(1)) - d*x(2);
  971.      >
  972.      > endfunction
  973.  
  974. Given the initial condition
  975.  
  976.      x0 = [1; 2];
  977.  
  978. and the set of output times as a column vector (note that the first
  979. output time corresponds to the initial condition given above)
  980.  
  981.      t = linspace (0, 50, 200)';
  982.  
  983. it is easy to integrate the set of differential equations:
  984.  
  985.      x = lsode ("f", x0, t);
  986.  
  987. The function `lsode' uses the Livermore Solver for Ordinary
  988. Differential Equations, described in A. C. Hindmarsh, `ODEPACK, a
  989. Systematized Collection of ODE Solvers', in: Scientific Computing, R. S.
  990. Stepleman et al. (Eds.), North-Holland, Amsterdam, 1983, pages 55-64.
  991.  
  992. Producing Graphical Output
  993. --------------------------
  994.  
  995.    To display the solution of the previous example graphically, use the
  996. command
  997.  
  998.      plot (t, x)
  999.  
  1000.    If you are using the X Window System, Octave will automatically
  1001. create a separate window to display the plot.  If you are using a
  1002. terminal that supports some other graphics commands, you will need to
  1003. tell Octave what kind of terminal you have.  Type the command
  1004.  
  1005.      set term
  1006.  
  1007. to see a list of the supported terminal types.  Octave uses `gnuplot'
  1008. to display graphics, and can display graphics on any terminal that is
  1009. supported by `gnuplot'.
  1010.  
  1011.    To capture the output of the plot command in a file rather than
  1012. sending the output directly to your terminal, you can use a set of
  1013. commands like this
  1014.  
  1015.      set term postscript
  1016.      set output "foo.ps"
  1017.      replot
  1018.  
  1019. This will work for other types of output devices as well.  Octave's
  1020. `set' command is really just piped to the `gnuplot' subprocess, so that
  1021. once you have a plot on the screen that you like, you should be able to
  1022. do something like this to create an output file suitable for your
  1023. graphics printer.
  1024.  
  1025.    Or, you can eliminate the intermediate file by using commands like
  1026. this
  1027.  
  1028.      set term postscript
  1029.      set output "|lpr -Pname_of_your_graphics_printer"
  1030.      replot
  1031.  
  1032. Editing What You Have Typed
  1033. ---------------------------
  1034.  
  1035.    At the Octave prompt, you can recall, edit, and reissue previous
  1036. commands using Emacs- or vi-style editing commands.  The default
  1037. keybindings use Emacs-style commands.  For example, to recall the
  1038. previous command, type `Control-P' (usually written `C-p' for short).
  1039. `C-p' gets  its name from the fact that you type it by holding down the
  1040. `CTRL' key and then pressing `p'.  Doing this will normally bring back
  1041. the previous line of input.  `C-n' will bring up the next line of
  1042. input, `C-b' will move the cursor backward on the line, `C-f' will move
  1043. the cursor forward on the line, etc.
  1044.  
  1045.    A complete description of the command line editing capability is
  1046. given in this manual in Appendix *Note Command Line Editing::.
  1047.  
  1048. Getting Help
  1049. ------------
  1050.  
  1051.    Octave has an extensive help facility.  The same documentation that
  1052. is available in printed form is also available from the Octave prompt,
  1053. because both forms of the documentation are created from the same input
  1054. file.
  1055.  
  1056.    In order to get good help you first need to know the name of the
  1057. command that you want to use.  This name of the function may not always
  1058. be obvious, but a good place to start is to just type `help'.  This
  1059. will show you all the operators, reserved words, functions, built-in
  1060. variables, and function files.  You can then get more help on anything
  1061. that is listed by simply including the name as an argument to help.
  1062. For example,
  1063.  
  1064.      help plot
  1065.  
  1066. will display the help text for the `plot' function.
  1067.  
  1068.    Octave sends output that is too long to fit on one screen through a
  1069. pager like `less' or `more'.  Type a carriage return to advance one
  1070. line, a space character to advance one page, and `q' to exit the pager.
  1071.  
  1072. Help via Info
  1073. .............
  1074.  
  1075.    The part of Octave's help facility that allows you to read the
  1076. complete text of the printed manual from within Octave uses a program
  1077. called Info.  When you invoke Info you will be put into a menu driven
  1078. program that contains the entire Octave manual.  Help for using Info is
  1079. provided in this manual in Appendix *Note Using Info::.
  1080.  
  1081. 
  1082. File: octave.info,  Node: Executable Octave Programs,  Next: Comments,  Prev: Simple Examples,  Up: Introduction
  1083.  
  1084. Executable Octave Programs
  1085. ==========================
  1086.  
  1087.    Once you have learned Octave, you may want to write self-contained
  1088. Octave scripts, using the `#!' script mechanism.  You can do this on
  1089. many Unix systems (1) (and someday on GNU).
  1090.  
  1091.    For example, you could create a text file named `hello', containing
  1092. the following lines:
  1093.  
  1094.      #! /usr/local/bin/octave -qf
  1095.      
  1096.      # a sample Octave program
  1097.      printf ("Hello, world!\n");
  1098.  
  1099. After making this file executable (with the `chmod' command), you can
  1100. simply type:
  1101.  
  1102.      hello
  1103.  
  1104. at the shell, and the system will arrange to run Octave (2) as if you
  1105. had typed:
  1106.  
  1107.      octave hello
  1108.  
  1109. Self-contained Octave scripts are useful when you want to write a
  1110. program which users can invoke without knowing that the program is
  1111. written in the Octave language.
  1112.  
  1113.    ---------- Footnotes ----------
  1114.  
  1115.    (1)  The `#!' mechanism works on Unix systems derived from Berkeley
  1116. Unix, System V Release 4, and some System V Release 3 systems.
  1117.  
  1118.    (2)  The line beginning with `#!' lists the full file name of an
  1119. interpreter to be run, and an optional initial command line argument to
  1120. pass to that interpreter.  The operating system then runs the
  1121. interpreter with the given argument and the full argument list of the
  1122. executed program.  The first argument in the list is the full file name
  1123. of the Octave program.  The rest of the argument list will either be
  1124. options to Octave, or data files, or both.  The `-qf' option is usually
  1125. specified in stand-alone Octave programs to prevent them from printing
  1126. the normal startup message, and to keep them from behaving differently
  1127. depending on the contents of a particular user's `~/.octaverc' file.
  1128. *Note Invoking Octave::.
  1129.  
  1130. 
  1131. File: octave.info,  Node: Comments,  Next: Errors,  Prev: Executable Octave Programs,  Up: Introduction
  1132.  
  1133. Comments in Octave Programs
  1134. ===========================
  1135.  
  1136.    A "comment" is some text that is included in a program for the sake
  1137. of human readers, and that is not really part of the program.  Comments
  1138. can explain what the program does, and how it works.  Nearly all
  1139. programming languages have provisions for comments, because programs are
  1140. typically hard to understand without them.
  1141.  
  1142.    In the Octave language, a comment starts with either the sharp sign
  1143. character, `#', or the percent symbol `%' and continues to the end of
  1144. the line.  The Octave interpreter ignores the rest of a line following
  1145. a sharp sign or percent symbol.  For example, we could have put the
  1146. following into the function `f':
  1147.  
  1148.      function xdot = f (x, t)
  1149.      
  1150.      # usage: f (x, t)
  1151.      #
  1152.      # This function defines the right-hand-side functions for a set of
  1153.      # nonlinear differential equations.
  1154.      
  1155.        r = 0.25
  1156.      
  1157.        and so on...
  1158.      
  1159.      endfunction
  1160.  
  1161.    The `help' command (*note Help::.) is able to find the first block
  1162. of comments in a function (even those that are composed directly on the
  1163. command line).  This means that users of Octave can use the same
  1164. commands to get help for built-in functions, and for functions that you
  1165. have defined.  For example, after defining the function `f' above, the
  1166. command
  1167.  
  1168.      help f
  1169.  
  1170. produces the output
  1171.  
  1172.       usage: f (x, t)
  1173.      
  1174.       This function defines the right-hand-side functions for a set of
  1175.       nonlinear differential equations.
  1176.  
  1177.    Although it is possible to put comment lines into keyboard-composed
  1178. throw-away Octave programs, it usually isn't very useful, because the
  1179. purpose of a comment is to help you or another person understand the
  1180. program at a later time.
  1181.  
  1182. 
  1183. File: octave.info,  Node: Errors,  Prev: Comments,  Up: Introduction
  1184.  
  1185. Errors
  1186. ======
  1187.  
  1188.    There are two classes of errors that Octave produces when it
  1189. encounters input that it is unable to understand, or when it is unable
  1190. to perform an action.
  1191.  
  1192.    A "parse error" occurs if Octave cannot understand something you
  1193. have typed.  For example, if you misspell a keyword,
  1194.  
  1195.      octave:13> functon y = f (x) y = x^2; endfunction
  1196.  
  1197. Octave will respond immediately with a message like this:
  1198.  
  1199.      parse error:
  1200.      
  1201.        functon y = f (x) y = x^2; endfunction
  1202.                ^
  1203.  
  1204. For most parse errors, Octave uses a caret (`^') to mark the point on
  1205. the line where it was unable to make sense of your input.  In this
  1206. case, Octave generated an error message because the keyword `function'
  1207. was misspelled.  Instead of seeing `function f', Octave saw two
  1208. consecutive variable names, which is invalid in this context.  It
  1209. marked the error at the `y' because the first name by itself was
  1210. accepted as valid input.
  1211.  
  1212.    Another class of error message occurs occurs at evaluation time.
  1213. These errors are called "run-time errors", or sometimes "evaluation
  1214. errors" because they occur when your program is being "run", or
  1215. "evaluated".  For example, if after correcting the mistake in the
  1216. previous function definition, you type
  1217.  
  1218.      octave:13> f ()
  1219.  
  1220. Octave will respond with
  1221.  
  1222.      error: `x' undefined near line 1 column 24
  1223.      error: evaluating expression near line 1, column 24
  1224.      error: evaluating assignment expression near line 1, column 22
  1225.      error: called from `f'
  1226.  
  1227.    This error message has several parts, and gives you quite a bit of
  1228. information to help you locate the source of the error.  The messages
  1229. are generated from the point of the innermost error, and provide a
  1230. traceback of enclosing expression and function calls.
  1231.  
  1232.    In the example above, the first line indicates that a variable named
  1233. `x' was found to be undefined near line 1 and column 24 of some
  1234. function or expression.  For errors occurring within functions, lines
  1235. are numbered beginning with the line containing the `function' keyword.
  1236. For errors occurring at the top level, the line number indicates the
  1237. input line number, which is usually displayed in the prompt string.
  1238.  
  1239.    The second and third lines in the example indicate that the error
  1240. occurred within an assignment expression, and the last line of the error
  1241. message indicates that the error occurred within the function `f'.  If
  1242. the function `f' had been called from another function, say `g', the
  1243. list of errors would have ended with one more line:
  1244.  
  1245.      error: called from `g'
  1246.  
  1247.    These lists of function calls usually make it fairly easy to trace
  1248. the path your program took before the error occurred, and to correct the
  1249. error before trying again.
  1250.  
  1251. 
  1252. File: octave.info,  Node: Invoking Octave,  Next: Expressions,  Prev: Introduction,  Up: Top
  1253.  
  1254. Invoking Octave
  1255. ***************
  1256.  
  1257.    Normally, Octave is used interactively by running the program
  1258. `octave' without any arguments.  Once started, Octave reads commands
  1259. from the terminal until you tell it to exit.
  1260.  
  1261.    You can also specify the name of a file on the command line, and
  1262. Octave will read and execute the commands from the named file and then
  1263. exit when it is finished.
  1264.  
  1265.    You can further control how Octave starts up by using the
  1266. command-line options described in the next section, and Octave itself
  1267. can remind you of the options available.  Type
  1268.  
  1269.      octave --help
  1270.  
  1271. to display all available options and briefly describe their use
  1272. (`octave -h' is a shorter equivalent).
  1273.  
  1274. * Menu:
  1275.  
  1276. * Command Line Options::
  1277. * Startup Files::
  1278.  
  1279. 
  1280. File: octave.info,  Node: Command Line Options,  Next: Startup Files,  Prev: Invoking Octave,  Up: Invoking Octave
  1281.  
  1282. Command Line Options
  1283. ====================
  1284.  
  1285. `--debug'
  1286. `-d'
  1287.      Enter parser debugging mode.  Using this option will cause Octave's
  1288.      parser to print a lot of information about the commands it reads,
  1289.      and is probably only useful if you are actually trying to debug
  1290.      the parser.
  1291.  
  1292. `--help'
  1293. `-h'
  1294. `-?'
  1295.      Print short help message and exit.
  1296.  
  1297. `--ignore-init-file'
  1298. `--norc'
  1299. `-f'
  1300.      Don't read any of the system or user initialization files at
  1301.      startup.
  1302.  
  1303. `--info-file FILENAME'
  1304.      Specify the name of the info file to use.  The value of FILENAME
  1305.      specified on the command line will override any value of
  1306.      `OCTAVE_INFO_FILE' found in the environment, but not any
  1307.      `INFO_FILE = "filename"' commands found in the system or user
  1308.      startup files.
  1309.  
  1310. `--interactive'
  1311. `-i'
  1312.      Force interactive behavior.
  1313.  
  1314. `--path PATH'
  1315. `-p PATH'
  1316.      Specify the path to search for function files.  The value of PATH
  1317.      specified on the command line will override any value of
  1318.      `OCTAVE_PATH' found in the environment, but not any `LOADPATH =
  1319.      "path"' commands found in the system or user startup files.
  1320.  
  1321. `--silent'
  1322. `--quiet'
  1323. `-q'
  1324.      Don't print message at startup.
  1325.  
  1326. `--verbose'
  1327. `-V'
  1328.      Turn on verbose output.
  1329.  
  1330. `--version'
  1331. `-v'
  1332.      Print the program version number and exit.
  1333.  
  1334. `--echo-commands'
  1335. `-x'
  1336.      Echo commands as they are executed.
  1337.  
  1338. `FILE'
  1339.      Execute commands from FILE.
  1340.  
  1341.