annotate doc/faq/FAQ.texi @ 2597:106ae3df29f5

[project @ 1996-12-17 17:48:01 by jwe]
author jwe
date Tue, 17 Dec 1996 17:48:02 +0000
parents b1a56412c385
children 20704e7e5e79
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
1 \input texinfo.tex @c -*-texinfo-*-
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
2
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
3 @setfilename FAQ.info
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
4 @settitle Frequently asked questions about Octave (with answers)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
5
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
6 @c Smaller amounts of whitespace for the 8.5 by 11 inch format.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
7 @tex
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
8 \global\chapheadingskip = 15pt plus 4pt minus 2pt
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
9 \global\secheadingskip = 12pt plus 3pt minus 2pt
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
10 \global\subsecheadingskip = 9pt plus 2pt minus 2pt
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
11 \global\parskip 5pt plus 1pt
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
12
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
13 @finalout
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
14 @end tex
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
15
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
16 @setchapternewpage off
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
17
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
18 @titlepage
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
19 @title Octave FAQ
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
20 @subtitle Frequently asked questions about Octave
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
21 @subtitle December 14, 1996
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
22 @sp 1
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
23 @author John W. Eaton
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
24 @page
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
25 @end titlepage
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
26
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
27 @ifinfo
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
28 @node Top, What is Octave?, (dir), (dir)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
29 @top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
30 @unnumbered Preface
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
31 @cindex FAQ for Octave, latest version
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
32 @end ifinfo
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
33
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
34 This is a list of frequently asked questions (FAQ) for Octave users.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
35
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
36 Some information in this FAQ was written for earlier versions of
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
37 Octave and may now be obsolete.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
38
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
39 I'm looking for new questions (@emph{with} answers), better answers,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
40 or both. Please send suggestions to bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
41 If you have general questions about Octave, or need help for something
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
42 that is not covered by the Octave manual or the FAQ, please use the
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
43 help-octave@@bevo.che.wisc.edu mailing list.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
44
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
45 This FAQ is intended to supplement, not replace, the Octave manual.
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
46 Before posting a question to the help-octave mailing list, you should
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
47 first check to see if the topic is covered in the manual.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
48
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
49 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
50 * What is Octave?::
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
51 * Version 2.0::
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
52 * Octave Features::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
53 * Documentation::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
54 * Getting Octave::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
55 * Installation::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
56 * Common problems::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
57 * Getting additional help::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
58 * Bug reports::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
59 * MATLAB compatibility::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
60 * Index::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
61 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
62
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
63 @node What is Octave?, Version 2.0, Top, Top
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
64 @chapter What is Octave?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
65
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
66 Octave is a high-level interactive language, primarily intended for
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
67 numerical computations that is mostly compatible with
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
68 @sc{Matlab}.@footnote{@sc{Matlab} is a registered trademark of The MathWorks,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
69 Inc.}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
70
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
71 Octave can do arithmetic for real and complex scalars and matrices,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
72 solve sets of nonlinear algebraic equations, integrate functions over
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
73 finite and infinite intervals, and integrate systems of ordinary
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
74 differential and differential-algebraic equations.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
75
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
76 Octave uses the GNU readline library to handle reading and editing
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
77 input. By default, the line editing commands are similar to the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
78 cursor movement commands used by GNU Emacs, and a vi-style line
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
79 editing interface is also available. At the end of each session, the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
80 command history is saved, so that commands entered during previous
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
81 sessions are not lost.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
82
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
83 The Octave distribution includes a 200+ page Texinfo manual. Access
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
84 to the complete text of the manual is available via the help command
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
85 at the Octave prompt.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
86
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
87 Two and three dimensional plotting is fully supported using gnuplot.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
88
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
89 The underlying numerical solvers are currently standard Fortran ones
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
90 like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
91 of C++ classes. If possible, the Fortran subroutines are compiled
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
92 with the system's Fortran compiler, and called directly from the C++
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
93 functions. If that's not possible, you can still compile Octave if
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
94 you have the free Fortran to C translator f2c.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
95
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
96 Octave is also free software; you can redistribute it and/or modify it
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
97 under the terms of the GNU General Public License as published by the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
98 Free Software Foundation.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
99
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
100 @node Version 2.0, Octave Features, What is Octave?, Top
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
101 @chapter What's new in version 2.0 of Octave
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
102
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
103 The long-awaited version 2.0 of Octave has now been released. Many
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
104 bugs have been fixed and lots of new features added. Octave is now much
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
105 more compatible with @sc{Matlab}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
106
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
107 Version 2.0 fixes many bugs, but as with any ``x.y.0'' release there
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
108 will be a few glitches. There will probably be a 2.0.1 release to fix
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
109 most of these problems. You can help contribute to the quality of
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
110 Octave by using it and submitting bug reports for the problems you
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
111 encounter.
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
112
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
113 A list of user-visible changes in recent versions of Octave may be found
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
114 in the file NEWS, distributed in both source and binary releases of
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
115 Octave.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
116
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
117 @node Octave Features, Documentation, Version 2.0, Top
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
118 @chapter What features are unique to Octave?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
119
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
120 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
121 * Command and variable name completion::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
122 * Command history::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
123 * Data structures::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
124 * Short-circuit boolean operators::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
125 * Increment and decrement operators::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
126 * Unwind-protect::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
127 * Variable-length argument lists::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
128 * Variable-length return lists::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
129 * Built-in ODE and DAE solvers::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
130 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
131
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
132 @node Command and variable name completion, Command history, Octave Features, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
133 @section Command and variable name completion
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
134
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
135 @cindex Command completion
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
136 @cindex Function name completion
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
137 @cindex Variable name completion
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
138 @cindex Name completion
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
139
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
140 Typing a TAB character (ASCII code 9) on the command line causes Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
141 to attempt to complete variable, function, and file names. Octave uses
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
142 the text before the cursor as the initial portion of the name to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
143 complete.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
144
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
145 For example, if you type @samp{fu} followed by TAB at the Octave prompt,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
146 Octave will complete the rest of the name @samp{function} on the command
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
147 line (unless you have other variables or functions defined that begin
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
148 with the characters @samp{fu}). If there is more than one possible
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
149 completion, Octave will ring the terminal bell to let you know that your
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
150 initial sequence of characters is not enough to specify a unique name.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
151 To complete the name, you may either edit the initial character sequence
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
152 (usually adding more characters until completion is possible) or type
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
153 another TAB to cause Octave to display the list of possible completions.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
154
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
155 @node Command history, Data structures, Command and variable name completion, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
156 @section Command history
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
157
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
158 @cindex Command history
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
159 @cindex History
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
160
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
161 When running interactively, Octave saves the commands you type in an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
162 internal buffer so that you can recall and edit them. Emacs and vi
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
163 editing modes are available with Emacs keybindings enabled by default.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
164
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
165 When Octave exits, the current command history is saved to the file
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
166 @file{~/.octave_hist}, and each time Octave starts, it inserts the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
167 contents of the @file{~/.octave_hist} file in the history list so that
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
168 it is easy to begin working where you left off.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
169
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
170 @node Data structures, Short-circuit boolean operators, Command history, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
171 @section Data structures
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
172
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
173 @cindex Data structures
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
174 @cindex Structures
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
175
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
176 Octave includes a limited amount of support for organizing data in
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
177 structures. The current implementation uses an associative array
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
178 with indices limited to strings, but the syntax is more like C-style
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
179 structures. Here are some examples of using data structures in Octave.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
180
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
181 @itemize @bullet
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
182 @item Elements of structures can be of any value type.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
183
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
184 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
185 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
186 octave:1> x.a = 1; x.b = [1, 2; 3, 4]; x.c = "string";
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
187 octave:2> x.a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
188 x.a = 1
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
189 octave:3> x.b
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
190 x.b =
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
191
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
192 1 2
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
193 3 4
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
194
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
195 octave:4> x.c
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
196 x.c = string
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
197 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
198 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
199
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
200 @item Structures may be copied.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
201
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
202 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
203 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
204 octave:1> y = x
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
205 y =
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
206 @{
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
207 a = 1
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
208 b =
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
209
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
210 1 2
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
211 3 4
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
212
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
213 c = string
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
214 s =
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
215
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
216 0.00000 0.00000 0.00000
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
217 0.00000 5.46499 0.00000
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
218 0.00000 0.00000 0.36597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
219
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
220 u =
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
221
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
222 -0.40455 -0.91451
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
223 -0.91451 0.40455
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
224
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
225 v =
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
226
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
227 -0.57605 0.81742
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
228 -0.81742 -0.57605
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
229 @}
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
230 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
231 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
232
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
233 @item Structure elements may reference other structures.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
234
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
235 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
236 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
237 octave:1> x.b.d = 3
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
238 x.b.d = 3
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
239 octave:2> x.b
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
240 ans =
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
241 @{
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
242 d = 3
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
243 @}
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
244 octave:3> x.b.d
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
245 ans = 3
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
246 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
247 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
248
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
249 @item Functions can return structures.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
250
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
251 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
252 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
253 octave:1> function y = f (x)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
254 > y.re = real (x);
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
255 > y.im = imag (x);
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
256 > endfunction
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
257
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
258 octave:2> f (rand + rand*I);
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
259 ans =
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
260 @{
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
261 im = 0.18033
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
262 re = 0.19069
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
263 @}
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
264 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
265 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
266
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
267 @item Function return lists can include structure elements, and they may
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
268 be indexed like any other variable.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
269
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
270 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
271 @group
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
272 octave:1> [x.u, x.s(2:3,2:3), x.v] = svd ([1, 2; 3, 4]);
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
273 octave:2> x
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
274 x =
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
275 @{
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
276 s =
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
277
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
278 0.00000 0.00000 0.00000
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
279 0.00000 5.46499 0.00000
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
280 0.00000 0.00000 0.36597
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
281
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
282 u =
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
283
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
284 -0.40455 -0.91451
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
285 -0.91451 0.40455
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
286
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
287 v =
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
288
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
289 -0.57605 0.81742
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
290 -0.81742 -0.57605
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
291 @}
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
292 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
293 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
294
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
295 @item You can also use the function @code{is_struct} to determine
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
296 whether a given value is a data structure. For example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
297
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
298 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
299 is_struct (x)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
300 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
301
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
302 @noindent
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
303 returns 1 if the value of the variable @var{x} is a data structure.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
304 @end itemize
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
305
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
306 This feature should be considered experimental, but you should expect it
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
307 to work. Suggestions for ways to improve it are welcome.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
308
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
309 @node Short-circuit boolean operators, Increment and decrement operators, Data structures, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
310 @section Short-circuit boolean operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
311
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
312 @cindex Boolean operators, short-circuit
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
313 @cindex Logical operators, short-circuit
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
314 @cindex Short-circuit boolean operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
315 @cindex Operators, boolean
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
316
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
317 Octave's @samp{&&} and @samp{||} logical operators are evaluated in
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
318 a short-circuit fashion (like the corresponding operators in the C
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
319 language) and work differently than the element by element operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
320 @samp{&} and @samp{|}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
321
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
322 @node Increment and decrement operators, Unwind-protect, Short-circuit boolean operators, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
323 @section Increment and decrement operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
324
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
325 @cindex Increment operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
326 @cindex Decrement operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
327 @cindex Operators, increment
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
328 @cindex Operators, decrement
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
329
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
330 Octave includes the C-like increment and decrement operators @samp{++}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
331 and @samp{--} in both their prefix and postfix forms.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
332
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
333 For example, to pre-increment the variable @var{x}, you would write
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
334 @code{++@var{x}}. This would add one to @var{x} and then return the new
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
335 value of @var{x} as the result of the expression. It is exactly the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
336 same as the expression @code{@var{x} = @var{x} + 1}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
337
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
338 To post-increment a variable @var{x}, you would write @code{@var{x}++}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
339 This adds one to the variable @var{x}, but returns the value that
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
340 @var{x} had prior to incrementing it. For example, if @var{x} is equal
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
341 to 2, the result of the expression @code{@var{x}++} is 2, and the new
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
342 value of @var{x} is 3.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
343
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
344 For matrix and vector arguments, the increment and decrement operators
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
345 work on each element of the operand.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
346
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
347 It is not currently possible to increment index expressions. For
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
348 example, you might expect that the expression @code{@var{v}(4)++} would
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
349 increment the fourth element of the vector @var{v}, but instead it
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
350 results in a parse error. This problem may be fixed in a future
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
351 release of Octave.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
352
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
353 @node Unwind-protect, Variable-length argument lists, Increment and decrement operators, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
354 @section Unwind-protect
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
355
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
356 @cindex Unwind-protect
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
357
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
358 Octave supports a limited form of exception handling modelled after the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
359 unwind-protect form of Lisp. The general form of an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
360 @code{unwind_protect} block looks like this:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
361
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
362 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
363 @group
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
364 unwind_protect
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
365 @var{body}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
366 unwind_protect_cleanup
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
367 @var{cleanup}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
368 end_unwind_protect
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
369 @end group
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
370 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
371
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
372 @noindent
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
373 Where @var{body} and @var{cleanup} are both optional and may contain any
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
374 Octave expressions or commands. The statements in @var{cleanup} are
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
375 guaranteed to be executed regardless of how control exits @var{body}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
376
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
377 The @code{unwind_protect} statement is often used to reliably restore
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
378 the values of global variables that need to be temporarily changed.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
379
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
380 @node Variable-length argument lists, Variable-length return lists, Unwind-protect, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
381 @section Variable-length argument lists
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
382
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
383 @cindex Variable-length argument lists
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
384 @cindex Argument lists, variable-length
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
385
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
386 Octave has a real mechanism for handling functions that take an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
387 unspecified number of arguments, so it is no longer necessary to place
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
388 an upper bound on the number of optional arguments that a function can
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
389 accept.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
390
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
391 Here is an example of a function that uses the new syntax to print a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
392 header followed by an unspecified number of values:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
393
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
394 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
395 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
396 function foo (heading, ...)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
397 disp (heading);
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
398 va_start ();
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
399 while (--nargin)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
400 disp (va_arg ());
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
401 endwhile
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
402 endfunction
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
403 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
404 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
405
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
406 Calling @code{va_start()} positions an internal pointer to the first
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
407 unnamed argument and allows you to cycle through the arguments more than
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
408 once. It is not necessary to call @code{va_start()} if you do not plan
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
409 to cycle through the arguments more than once.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
410
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
411 The function @code{va_arg()} returns the value of the next available
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
412 argument and moves the internal pointer to the next argument. It is an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
413 error to call @code{va_arg()} when there are no more arguments
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
414 available.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
415
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
416 It is also possible to use the keyword @var{all_va_args} to pass all
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
417 unnamed arguments to another function.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
418
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
419 @node Variable-length return lists, Built-in ODE and DAE solvers, Variable-length argument lists, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
420 @section Variable-length return lists
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
421
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
422 @cindex Variable-length return lists
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
423 @cindex Return lists, variable-length
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
424
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
425 Octave also has a real mechanism for handling functions that return an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
426 unspecified number of values, so it is no longer necessary to place an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
427 upper bound on the number of outputs that a function can produce.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
428
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
429 Here is an example of a function that uses the new syntax to produce
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
430 @samp{N} values:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
431
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
432 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
433 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
434 function [...] = foo (n)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
435 for i = 1:n
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
436 vr_val (i);
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
437 endfor
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
438 endfunction
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
439 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
440 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
441
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
442 @node Built-in ODE and DAE solvers, , Variable-length return lists, Octave Features
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
443 @section Built-in ODE and DAE solvers
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
444
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
445 @cindex DASSL
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
446 @cindex LSODE
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
447
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
448 Octave includes LSODE and DASSL for solving systems of stiff ordinary
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
449 differential and differential-algebraic equations. These functions are
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
450 built in to the interpreter.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
451
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
452 @node Documentation, Getting Octave, Octave Features, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
453 @chapter What documentation exists for Octave?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
454
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
455 @cindex Octave, documentation
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
456
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
457 The Octave distribution includes a 220+ page manual that is also
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
458 distributed under the terms of the GNU GPL.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
459
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
460 The Octave manual is intended to be a complete reference for Octave, but
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
461 it is not a finished document. If you have problems using it, or find
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
462 that some topic is not adequately explained, indexed, or
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
463 cross-referenced, please send a bug report to bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
464
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
465 Because the Octave manual is written using Texinfo, the complete text of
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
466 the Octave manual is also available on line using the GNU Info system
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
467 via the GNU Emacs, info, or xinfo programs, or by using the @samp{help -i}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
468 command to start the GNU info browser directly from the Octave prompt.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
469
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
470 It is also possible to use your favorite WWW browser to read the Octave
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
471 manual (or any other Info file) by using Roar Smith's info2www program
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
472 to convert GNU Info files to HTML. The source for info2www is available
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
473 from @url{ftp://ftp.che.wisc.edu/pub/www}.
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
474
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
475 @node Getting Octave, Installation, Documentation, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
476 @chapter Obtaining Source Code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
477
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
478 @cindex Source code
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
479
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
480 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
481 * Octave for Unix::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
482 * Octave for other platforms::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
483 * latest versions::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
484 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
485
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
486 @node Octave for Unix, Octave for other platforms, Getting Octave, Getting Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
487 @section How do I get a copy of Octave for Unix?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
488
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
489 You can get Octave from a friend who has a copy, by anonymous FTP, or by
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
490 ordering a tape or CD-ROM from the Free Software Foundation (FSF).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
491
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
492 @cindex Octave, ordering
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
493 @cindex Octave, getting a copy
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
494
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
495 Octave was not developed by the FSF, but the FSF does distribute Octave,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
496 and the developers of Octave support the efforts of the FSF by
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
497 encouraging users of Octave to order Octave on tape or CD directly from
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
498 the FSF.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
499
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
500 The FSF is a nonprofit organization that distributes software and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
501 manuals to raise funds for more GNU development. Buying a tape or CD
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
502 from the FSF contributes directly to paying staff to develop GNU
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
503 software. CD-ROMs cost $400 if an organization is buying, or $100 if an
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
504 individual is buying. Tapes cost around $200 depending on media type.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
505
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
506 The FSF only makes new CD releases a few times a year, so if you are
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
507 interested specifically in Octave, I recommend asking for the latest
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
508 release on tape.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
509
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
510 @cindex FSF [Free Software Foundation]
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
511 @cindex GNU [GNU's not unix]
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
512
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
513 For more information about ordering from the FSF, contact
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
514 gnu@@prep.ai.mit.edu, phone (617) 542-5942 or anonymous ftp file
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
515 @file{/pub/gnu/GNUinfo/ORDERS} from prep.ai.mit.edu or one of the sites
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
516 listed below.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
517
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
518 @cindex FSF, contact <gnu@@prep.ai.mit.edu>
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
519 @cindex GNUware, anonymous FTP sites
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
520
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
521 If you are on the Internet, you can copy the latest distribution
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
522 version of Octave from the file @file{/pub/octave/octave-M.N.tar.gz}, on
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
523 the host @file{ftp.che.wisc.edu}. This tar file has been compressed
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
524 with GNU gzip, so be sure to use binary mode for the transfer. @samp{M}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
525 and @samp{N} stand for version numbers; look at a listing of the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
526 directory through ftp to see what version is available. After you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
527 unpack the distribution, be sure to look at the files @file{README} and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
528 @file{INSTALL}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
529
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
530 Binaries for several popular systems are also available. If you would
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
531 like help out by making binaries available for other systems, please
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
532 contact bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
533
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
534 A list of user-visible changes since the last release is available in
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
535 the file @file{NEWS}. The file @file{ChangeLog} in the source
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
536 distribution contains a more detailed record of changes made since the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
537 last release.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
538
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
539 @node Octave for other platforms, latest versions, Octave for Unix, Getting Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
540 @section How do I get a copy of Octave for (some other platform)?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
541
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
542 @cindex VMS support
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
543 @cindex VAX
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
544 @cindex MS-DOS support
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
545 @cindex DJGPP
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
546 @cindex EMX
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
547 @cindex OS/2 support
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
548
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
549 Octave currently runs on Unix-like systems only. It should be possible
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
550 to make Octave work on other systems. If you are interested in porting
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
551 Octave to other systems, please contact bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
552
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
553 @node latest versions, , Octave for other platforms, Getting Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
554 @section What is the latest version of Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
555
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
556 @cindex Octave, version date
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
557
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
558 The latest version of Octave is 2.0, released December 1996.
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
559
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
560 @node Installation, Common problems, Getting Octave, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
561 @chapter Installation Issues and Problems
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
562
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
563 @cindex Octave, building
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
564
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
565 Octave requires approximately 50MB of disk storage to unpack and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
566 install (significantly less if you don't compile with debugging
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
567 symbols).
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
568
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
569 Octave has been compiled and tested with g++ and libg++ on a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
570 SPARCstation 2 running SunOS 4.1.2, an IBM RS/6000 running AIX 3.2.5,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
571 DEC Alpha systems running OSF/1 1.3 and 3.0, a DECstation 5000/240
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
572 running Ultrix 4.2a, and i486 systems running Linux. It should work on
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
573 most other Unix systems that have a working port of g++ and libg++.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
574
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
575 @menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
576 * What else do I need?::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
577 * Other C++ compilers?::
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
578 @end menu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
579
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
580 @node What else do I need?, Other C++ compilers?, Installation, Installation
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
581 @section What else do I need?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
582
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
583 @cindex GNU gcc
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
584 @cindex GNU g++
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
585 @cindex libg++
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
586 @cindex GNU Make
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
587 @cindex Flex
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
588 @cindex GNU Bison
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
589
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
590 In order to build Octave, you will need a current version
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
591 of g++, libg++, and GNU make. If you don't have these tools, you can
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
592 get them from many anonymous ftp archives, including ftp.che.wisc.edu,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
593 ftp.uu.net, prep.ai.mit.edu, and wuarchive.wustl.edu, or by writing to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
594 the FSF at 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
595
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
596 @node Other C++ compilers?, , What else do I need?, Installation
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
597 @section Can I compile Octave with another C++ compiler?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
598
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
599 Currently, Octave can only be compiled with the GNU C++ compiler. It
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
600 would be nice to make it possible to compile Octave with other C++
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
601 compilers, but the maintainers do not have sufficient time to devote to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
602 this. If you are interested in working to make Octave portable to other
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
603 compilers, please contact bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
604
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
605 @node Common problems, Getting additional help, Installation, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
606 @chapter Common problems
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
607
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
608 This list is probably far too short. Feel free to suggest additional
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
609 questions (preferably with answers!)
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
610
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
611 @itemize @bullet
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
612 @item
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
613 Octave takes a long time to find symbols.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
614
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
615 Octave is probably spending this time recursively searching directories
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
616 for function files. Check the value of your LOADPATH. For those
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
617 elements that end in @samp{//}, do any name a very large directory tree?
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
618 Does it contain directories that have a mixture of files and
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
619 directories? In order for the recursive directory searching code to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
620 work efficiently, directories that are to be searched recursively should
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
621 have either function files only, or subdirectories only, but not a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
622 mixture of both. Check to make sure that Octave's standard set of
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
623 function files is installed this way.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
624 @end itemize
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
625
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
626 @node Getting additional help, Bug reports, Common problems, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
627 @chapter Getting additional help
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
628
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
629 @cindex Additional help
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
630 @cindex Mailing lists, help-octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
631
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
632 The mailing list
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
633
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
634 @example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
635 help-octave@@bevo.che.wisc.edu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
636 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
637
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
638 @noindent
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
639 is available for questions related to using, installing, and porting
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
640 Octave that are not adequately answered by the Octave manual or by this
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
641 document.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
642
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
643 If you would like to join the discussion and receive all messages sent
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
644 to the list, please send a short note to
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
645
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
646 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
647 @group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
648 help-octave-request@@bevo.che.wisc.edu
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
649 ^^^^^^^
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
650 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
651 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
652
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
653 @strong{Please do not} send requests to be added or removed from the the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
654 mailing list, or other administrative trivia to the list itself.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
655
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
656 An archive of old postings to the help-octave mailing list is maintained
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
657 on ftp.che.wisc.edu in the directory @file{/pub/octave/MAILING-LISTS}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
658
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
659 @node Bug reports, MATLAB compatibility, Getting additional help, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
660 @chapter I think I have found a bug in Octave.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
661
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
662 @cindex Bug in Octave, newly found
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
663
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
664 ``I think I have found a bug in Octave, but I'm not sure. How do I know,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
665 and who should I tell?''
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
666
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
667 @cindex Manual, for Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
668
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
669 First, see the section on bugs and bug reports in the Octave manual.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
670 The Octave manual is included in the Octave distribution.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
671
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
672 When you report a bug, make sure to describe the type of computer you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
673 are using, the version of the operating system it is running, and the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
674 version of Octave that you are using. Also provide enough code so that
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
675 the Octave maintainers can duplicate your bug.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
676
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
677 If you have Octave working at all, the easiest way to do this is to use
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
678 the Octave function @code{bug_report}. When you execute this function,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
679 Octave will prompt you for a subject and then invoke the editor on a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
680 file that already contains all the configuration information. When you
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
681 exit the editor, Octave will mail the bug report for you.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
682
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
683 @cindex Octave bug report
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
684 @cindex Mailing lists, bug-octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
685
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
686 If for some reason you cannot use Octave's @code{bug_report} function,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
687 mail your bug report to "bug-octave@@bevo.che.wisc.edu". Your message
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
688 needs to include enough information to allow the maintainers of Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
689 to fix the bug. Please read the section on bugs and bug reports in the
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
690 Octave manual for a list of things that should be included in every bug
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
691 report.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
692
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
693 @node MATLAB compatibility, Index, Bug reports, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
694 @chapter Porting programs from @sc{Matlab} to Octave
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
695
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
696 @cindex @sc{Matlab} compatibility
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
697 @cindex Compatibility with @sc{Matlab}
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
698
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
699 ``I wrote some code for @sc{Matlab}, and I want to get it running under
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
700 Octave. Is there anything I should watch out for?''
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
701
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
702 The differences between Octave and @sc{Matlab} typically fall into one of
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
703 three categories:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
704
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
705 @enumerate
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
706 @item
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
707 Irrelevant.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
708
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
709 @item
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
710 Known differences, perhaps configurable with a user preference variable.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
711
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
712 @item
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
713 Unknown differences.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
714 @end enumerate
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
715
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
716 The first category, irrelevant differences, do not affect computations
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
717 and most likely do not affect the execution of function files.
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
718
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
719 The differences of the second category are usually because the authors
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
720 of Octave decided on a better (subjective) implementation that the way
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
721 @sc{Matlab} does it, and so introduced ``user preference variables'' so that
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
722 you can customize Octave's behavior to be either @sc{Matlab}-compatible or
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
723 to use Octave's new features. To make Octave more @sc{Matlab}-compatible,
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
724 put the following statements in your @file{~/.octaverc} file, or use the
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
725 command line option @samp{--traditional}, which implies all of these
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
726 settings. Note that this list may not be complete, because some new
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
727 variables may have been introduced since this document was last updated.
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
728
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
729 @example
2597
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
730 @group
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
731 PS1 = ">> ";
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
732 PS2 = "";
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
733 beep_on_error = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
734 default_save_format = "mat-binary";
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
735 define_all_return_values = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
736 do_fortran_indexing = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
737 empty_list_elements_ok = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
738 implicit_str_to_num_ok = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
739 ok_to_lose_imaginary_part = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
740 page_screen_output = 0;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
741 prefer_column_vectors = 0;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
742 prefer_zero_one_indexing = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
743 print_empty_dimensions = 0;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
744 treat_neg_dim_as_zero = 1;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
745 warn_function_name_clash = 0;
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
746 whitespace_in_literal_matrix = "traditional";
106ae3df29f5 [project @ 1996-12-17 17:48:01 by jwe]
jwe
parents: 2333
diff changeset
747 @end group
2333
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
748 @end example
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
749
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
750 Some other known differences are:
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
751
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
752 @itemize @bullet
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
753 @item
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
754 The Octave plotting functions are mostly compatible with the ones from
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
755 @sc{Matlab} 3.x, but not from @sc{Matlab} 4.x.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
756 @end itemize
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
757
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
758 The third category of differences is (hopefully) shrinking. If you find
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
759 a difference between Octave behavior and @sc{Matlab}, then you should send a
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
760 description of this difference (with code illustrating the difference,
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
761 if possible) to bug-octave@@bevo.che.wisc.edu.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
762
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
763 An archive of old postings to the Octave mailing lists is maintained
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
764 on ftp.che.wisc.edu in the directory @file{/pub/octave/MAILING-LISTS}.
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
765
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
766 @node Index, , MATLAB compatibility, Top
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
767 @appendix Concept Index
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
768
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
769 @printindex cp
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
770
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
771 @page
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
772 @contents
b1a56412c385 [project @ 1996-07-19 02:20:16 by jwe]
jwe
parents:
diff changeset
773 @bye