3403
|
1 % Copyright (C) 1996, 1997 John W. Eaton |
|
2 % This is part of the Octave manual. |
|
3 % For copying conditions, see the file gpl.texi. |
|
4 |
|
5 \input texinfo |
|
6 @setfilename octave.info |
|
7 |
3405
|
8 @c The following macro is used for the on-line help system, but we don't |
|
9 @c want lots of `See also: foo, bar, and baz' strings cluttering the |
|
10 @c printed manual (that information should be in the supporting text for |
3406
|
11 @c each group of functions and variables). |
3405
|
12 |
|
13 @macro seealso {args} |
5642
|
14 @sp 1 |
|
15 @noindent |
|
16 See also: \args\. |
3405
|
17 @end macro |
|
18 |
3403
|
19 @ifinfo |
|
20 @format |
|
21 START-INFO-DIR-ENTRY |
|
22 * Octave: (octave). Interactive language for numerical computations. |
|
23 END-INFO-DIR-ENTRY |
|
24 @end format |
|
25 @end ifinfo |
|
26 |
|
27 @c Settings for printing on 8-1/2 by 11 inch paper: |
|
28 @c ----------------------------------------------- |
|
29 |
|
30 @setchapternewpage odd |
|
31 |
|
32 @c Settings for small book format: |
|
33 @c ------------------------------ |
|
34 |
|
35 @ignore |
|
36 @smallbook |
|
37 @setchapternewpage odd |
|
38 @finalout |
|
39 @iftex |
|
40 @cropmarks |
|
41 @end iftex |
|
42 @end ignore |
|
43 |
|
44 @defindex op |
|
45 |
3453
|
46 @c Things like the Octave version number are defined in conf.texi. |
3403
|
47 @c This file doesn't include a chapter, so it must not be included |
|
48 @c if you want to run the Emacs function texinfo-multiple-files-update. |
|
49 |
|
50 @include conf.texi |
|
51 |
|
52 @settitle GNU Octave |
|
53 |
5423
|
54 @ifnottex |
3403
|
55 |
|
56 Copyright (C) 1996, 1997 John W. Eaton. |
|
57 |
|
58 Permission is granted to make and distribute verbatim copies of |
|
59 this manual provided the copyright notice and this permission notice |
|
60 are preserved on all copies. |
|
61 |
|
62 @ignore |
|
63 Permission is granted to process this file through Tex and print the |
|
64 results, provided the printed document carries copying permission |
|
65 notice identical to this one except for the removal of this paragraph |
|
66 (this paragraph not being relevant to the printed manual). |
|
67 |
|
68 @end ignore |
|
69 Permission is granted to copy and distribute modified versions of |
|
70 this manual under the conditions for verbatim copying, provided that |
|
71 the entire resulting derived work is distributed under the terms of |
|
72 a permission notice identical to this one. |
|
73 |
|
74 Permission is granted to copy and distribute translations of this |
|
75 manual into another language, under the above conditions for |
|
76 modified versions. |
5423
|
77 @end ifnottex |
3403
|
78 |
|
79 @titlepage |
|
80 @title GNU Octave |
|
81 @subtitle A high-level interactive language for numerical computations |
|
82 @subtitle Edition 3 for Octave version @value{VERSION} |
|
83 @subtitle February 1997 |
|
84 @author John W. Eaton |
|
85 @page |
|
86 @vskip 0pt plus 1filll |
|
87 Copyright @copyright{} 1996, 1997 John W. Eaton. |
|
88 |
|
89 This is the third edition of the Octave documentation, and is consistent |
|
90 with version @value{VERSION} of Octave. |
|
91 |
|
92 Permission is granted to make and distribute verbatim copies of |
|
93 this manual provided the copyright notice and this permission notice |
|
94 are preserved on all copies. |
|
95 |
|
96 Permission is granted to copy and distribute modified versions of this |
|
97 manual under the conditions for verbatim copying, provided that the entire |
|
98 resulting derived work is distributed under the terms of a permission |
|
99 notice identical to this one. |
|
100 |
|
101 Permission is granted to copy and distribute translations of this manual |
|
102 into another language, under the same conditions as for modified versions. |
|
103 |
|
104 Portions of this document have been adapted from the @code{gawk}, |
|
105 @code{readline}, @code{gcc}, and C library manuals, published by the Free |
5307
|
106 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
107 02110-1301--1307, USA. |
3403
|
108 @end titlepage |
|
109 |
3606
|
110 @contents |
|
111 |
5423
|
112 @ifnottex |
4167
|
113 @node Top |
3403
|
114 @top |
|
115 |
|
116 This manual documents how to run, install and port GNU Octave, as well |
|
117 as its new features and incompatibilities, and how to report bugs. |
|
118 It corresponds to GNU Octave version @value{VERSION}. |
5423
|
119 @end ifnottex |
3403
|
120 |
5424
|
121 @c ------------------------------------------------------------------------ |
|
122 |
3403
|
123 @menu |
|
124 * Preface:: |
|
125 * Introduction:: A brief introduction to Octave. |
|
126 * Getting Started:: |
|
127 * Data Types:: |
|
128 * Numeric Data Types:: |
|
129 * Strings:: |
|
130 * Data Structures:: |
6520
|
131 * Cell Arrays:: |
3403
|
132 * Variables:: |
|
133 * Expressions:: Expressions. |
|
134 * Evaluation:: |
|
135 * Statements:: Looping and program flow control. |
|
136 * Functions and Scripts:: |
|
137 * Error Handling:: |
4178
|
138 * Debugging:: |
3403
|
139 * Input and Output:: |
|
140 * Plotting:: |
|
141 * Matrix Manipulation:: |
|
142 * Arithmetic:: |
6549
|
143 * Bit Manipulations:: |
3403
|
144 * Linear Algebra:: |
|
145 * Nonlinear Equations:: |
5164
|
146 * Sparse Matrices:: |
3403
|
147 * Quadrature:: |
|
148 * Differential Equations:: |
|
149 * Optimization:: |
|
150 * Statistics:: |
3439
|
151 * Financial Functions:: |
3403
|
152 * Sets:: |
|
153 * Polynomial Manipulations:: |
6549
|
154 * Interpolation:: |
6558
|
155 * Geometry:: |
|
156 * Hashing:: |
3403
|
157 * Control Theory:: |
|
158 * Signal Processing:: |
|
159 * Image Processing:: |
|
160 * Audio Processing:: |
3452
|
161 * Quaternions:: |
3403
|
162 * System Utilities:: |
6537
|
163 * Packages:: |
5582
|
164 * Test and Demo Functions:: |
3403
|
165 * Tips:: |
|
166 * Trouble:: If you have trouble installing Octave. |
|
167 * Installation:: How to configure, compile and install Octave. |
|
168 * Emacs:: |
|
169 * Grammar:: |
|
170 * Copying:: The GNU General Public License. |
|
171 * Concept Index:: An item for each concept. |
|
172 * Variable Index:: An item for each documented variable. |
|
173 * Function Index:: An item for each documented function. |
|
174 * Operator Index:: An item for each documented operator. |
|
175 |
|
176 @detailmenu |
|
177 --- The Detailed Node Listing --- |
|
178 |
|
179 Preface |
|
180 |
3453
|
181 * Acknowledgements:: |
|
182 * How You Can Contribute to Octave:: |
|
183 * Distribution:: |
|
184 |
|
185 A Brief Introduction to Octave |
|
186 |
|
187 * Running Octave:: |
|
188 * Simple Examples:: |
|
189 * Conventions:: |
|
190 |
|
191 Conventions |
|
192 |
|
193 * Fonts:: |
|
194 * Evaluation Notation:: |
|
195 * Printing Notation:: |
|
196 * Error Messages:: |
|
197 * Format of Descriptions:: |
|
198 |
|
199 Format of Descriptions |
|
200 |
|
201 * A Sample Function Description:: |
|
202 * A Sample Command Description:: |
|
203 * A Sample Variable Description:: |
|
204 |
|
205 Getting Started |
|
206 |
|
207 * Invoking Octave:: |
|
208 * Quitting Octave:: |
|
209 * Getting Help:: |
|
210 * Command Line Editing:: |
|
211 * Errors:: |
|
212 * Executable Octave Programs:: |
|
213 * Comments:: |
|
214 |
|
215 Invoking Octave |
|
216 |
|
217 * Command Line Options:: |
|
218 * Startup Files:: |
|
219 |
|
220 Command Line Editing |
|
221 |
|
222 * Cursor Motion:: |
|
223 * Killing and Yanking:: |
|
224 * Commands For Text:: |
|
225 * Commands For Completion:: |
|
226 * Commands For History:: |
|
227 * Customizing readline:: |
|
228 * Customizing the Prompt:: |
|
229 * Diary and Echo Commands:: |
|
230 |
|
231 Data Types |
|
232 |
|
233 * Built-in Data Types:: |
|
234 * User-defined Data Types:: |
|
235 * Object Sizes:: |
|
236 |
|
237 Built-in Data Types |
|
238 |
|
239 * Numeric Objects:: |
|
240 * String Objects:: |
|
241 * Data Structure Objects:: |
|
242 |
|
243 Numeric Data Types |
|
244 |
|
245 * Matrices:: |
|
246 * Ranges:: |
6549
|
247 * Integer Data Types:: |
3453
|
248 * Logical Values:: |
|
249 * Predicates for Numeric Objects:: |
|
250 |
|
251 Matrices |
|
252 |
|
253 * Empty Matrices:: |
|
254 |
|
255 Strings |
|
256 |
|
257 * Creating Strings:: |
|
258 * Searching and Replacing:: |
|
259 * String Conversions:: |
|
260 * Character Class Functions:: |
|
261 |
6517
|
262 Cell Arrays |
3453
|
263 |
6517
|
264 * Creating Cell Arrays:: |
|
265 * Indexing Cell Arrays:: |
|
266 * Cell Arrays of Strings:: |
|
267 * Processing Data in Cell Arrays:: |
3453
|
268 |
|
269 Variables |
|
270 |
|
271 * Global Variables:: |
|
272 * Status of Variables:: |
|
273 * Summary of Built-in Variables:: |
|
274 * Defaults from the Environment:: |
|
275 |
|
276 Expressions |
|
277 |
|
278 * Index Expressions:: |
|
279 * Calling Functions:: |
|
280 * Arithmetic Ops:: |
|
281 * Comparison Ops:: |
|
282 * Boolean Expressions:: |
|
283 * Assignment Ops:: |
|
284 * Increment Ops:: |
|
285 * Operator Precedence:: |
|
286 |
|
287 Calling Functions |
|
288 |
|
289 * Call by Value:: |
|
290 * Recursion:: |
|
291 |
|
292 Boolean Expressions |
|
293 |
|
294 * Element-by-element Boolean Operators:: |
|
295 * Short-circuit Boolean Operators:: |
|
296 |
|
297 Statements |
|
298 |
|
299 * The if Statement:: |
|
300 * The switch Statement:: |
|
301 * The while Statement:: |
3489
|
302 * The do-until Statement:: |
3453
|
303 * The for Statement:: |
|
304 * The break Statement:: |
|
305 * The continue Statement:: |
|
306 * The unwind_protect Statement:: |
|
307 * The try Statement:: |
|
308 * Continuation Lines:: |
|
309 |
|
310 The @code{for} Statement |
|
311 |
|
312 * Looping Over Structure Elements:: |
|
313 |
|
314 Functions and Script Files |
|
315 |
|
316 * Defining Functions:: |
|
317 * Multiple Return Values:: |
|
318 * Variable-length Argument Lists:: |
|
319 * Variable-length Return Lists:: |
|
320 * Returning From a Function:: |
|
321 * Function Files:: |
|
322 * Script Files:: |
|
323 * Dynamically Linked Functions:: |
|
324 * Organization of Functions:: |
|
325 |
4178
|
326 Error Handling |
|
327 |
|
328 Debugging |
|
329 |
3453
|
330 Input and Output |
|
331 |
|
332 * Basic Input and Output:: |
|
333 * C-Style I/O Functions:: |
|
334 |
|
335 Basic Input and Output |
|
336 |
|
337 * Terminal Output:: |
|
338 * Terminal Input:: |
|
339 * Simple File I/O:: |
|
340 |
|
341 C-Style I/O Functions |
|
342 |
|
343 * Opening and Closing Files:: |
|
344 * Simple Output:: |
|
345 * Line-Oriented Input:: |
|
346 * Formatted Output:: |
|
347 * Output Conversion for Matrices:: |
|
348 * Output Conversion Syntax:: |
|
349 * Table of Output Conversions:: |
|
350 * Integer Conversions:: |
6554
|
351 * Floating-Point Conversions:: |
3453
|
352 * Other Output Conversions:: |
|
353 * Formatted Input:: |
|
354 * Input Conversion Syntax:: |
|
355 * Table of Input Conversions:: |
|
356 * Numeric Input Conversions:: |
|
357 * String Input Conversions:: |
|
358 * Binary I/O:: |
|
359 * Temporary Files:: |
|
360 * EOF and Errors:: |
|
361 * File Positioning:: |
|
362 |
|
363 Plotting |
|
364 |
|
365 * Two-Dimensional Plotting:: |
|
366 * Specialized Two-Dimensional Plots:: |
|
367 * Three-Dimensional Plotting:: |
|
368 * Plot Annotations:: |
|
369 * Multiple Plots on One Page:: |
|
370 * Multiple Plot Windows:: |
|
371 * Interaction with gnuplot:: |
|
372 |
|
373 Matrix Manipulation |
|
374 |
|
375 * Finding Elements and Checking Conditions:: |
|
376 * Rearranging Matrices:: |
6550
|
377 * Applying a Function to an Array:: |
3453
|
378 * Special Utility Matrices:: |
|
379 * Famous Matrices:: |
|
380 |
|
381 Arithmetic |
|
382 |
|
383 * Utility Functions:: |
|
384 * Complex Arithmetic:: |
|
385 * Trigonometry:: |
|
386 * Sums and Products:: |
|
387 * Special Functions:: |
|
388 * Mathematical Constants:: |
|
389 |
|
390 Linear Algebra |
|
391 |
6531
|
392 * Techniques used for Linear Algebra:: |
3453
|
393 * Basic Matrix Functions:: |
|
394 * Matrix Factorizations:: |
|
395 * Functions of a Matrix:: |
|
396 |
5164
|
397 Sparse Matrices |
|
398 |
|
399 * Basics:: |
|
400 * Sparse Linear Algebra:: |
|
401 * Iterative Techniques:: |
5648
|
402 * Real Life Example:: |
5164
|
403 * Oct-Files:: |
|
404 * Function Reference:: |
|
405 |
3453
|
406 Quadrature |
|
407 |
|
408 * Functions of One Variable:: |
|
409 * Orthogonal Collocation:: |
|
410 |
|
411 Differential Equations |
|
412 |
|
413 * Ordinary Differential Equations:: |
|
414 * Differential-Algebraic Equations:: |
|
415 |
|
416 Optimization |
|
417 |
|
418 * Quadratic Programming:: |
|
419 * Nonlinear Programming:: |
|
420 * Linear Least Squares:: |
|
421 |
|
422 Statistics |
|
423 |
|
424 * Basic Statistical Functions:: |
3489
|
425 * Tests:: |
3453
|
426 * Models:: |
|
427 * Distributions:: |
|
428 |
|
429 Control Theory |
|
430 |
|
431 * sysstruct:: |
|
432 * sysinterface:: |
|
433 * sysdisp:: |
|
434 * blockdiag:: |
|
435 * numerical:: |
|
436 * sysprop:: |
|
437 * systime:: |
|
438 * sysfreq:: |
|
439 * cacsd:: |
|
440 * misc:: |
|
441 |
|
442 System Data Structure |
|
443 |
|
444 * sysstructvars:: |
|
445 * sysstructtf:: |
|
446 * sysstructzp:: |
|
447 * sysstructss:: |
|
448 |
|
449 System Construction and Interface Functions |
|
450 |
|
451 * fir2sys:: |
|
452 * ss2sys:: |
|
453 * tf2sys:: |
|
454 * zp2sys:: |
|
455 * structaccess:: |
|
456 |
6535
|
457 Image Processing |
|
458 |
|
459 * Loading and Saving Images:: |
|
460 * Displaying Images:: |
|
461 * Representing Images:: |
|
462 * Plotting on top of Images:: |
|
463 * Color Conversion:: |
|
464 |
3453
|
465 System Utilities |
|
466 |
|
467 * Timing Utilities:: |
|
468 * Filesystem Utilities:: |
6549
|
469 * File Archiving Utilities:: |
|
470 * Networking Utilities:: |
3453
|
471 * Controlling Subprocesses:: |
|
472 * Process ID Information:: |
|
473 * Environment Variables:: |
|
474 * Current Working Directory:: |
|
475 * Password Database Functions:: |
|
476 * Group Database Functions:: |
|
477 * System Information:: |
|
478 |
6537
|
479 Packages |
|
480 |
|
481 * Installing and Removing Packages:: |
|
482 * Using Packages:: |
|
483 * Administrating Packages:: |
|
484 * Creating Packages:: |
|
485 * The DESCRIPTION File:: |
|
486 * The INDEX file:: |
|
487 * PKG_ADD and PKG_DEL directives:: |
|
488 |
5582
|
489 Test and Demo Functions |
|
490 |
|
491 * Test Functions:: |
|
492 * Demonstration Functions:: |
|
493 |
3453
|
494 Tips and Standards |
|
495 |
|
496 * Style Tips:: Writing clean and robust programs. |
|
497 * Coding Tips:: Making code run faster. |
|
498 * Documentation Tips:: Writing readable documentation strings. |
|
499 * Comment Tips:: Conventions for writing comments. |
|
500 * Function Headers:: Standard headers for functions. |
|
501 |
|
502 Known Causes of Trouble with Octave |
|
503 |
|
504 * Actual Bugs:: Bugs we will fix later. |
|
505 * Reporting Bugs:: |
|
506 * Bug Criteria:: |
|
507 * Bug Lists:: |
|
508 * Bug Reporting:: |
|
509 * Sending Patches:: |
|
510 * Service:: |
|
511 |
|
512 Reporting Bugs |
|
513 |
|
514 * Bug Criteria:: |
|
515 * Where: Bug Lists. Where to send your bug report. |
|
516 * Reporting: Bug Reporting. How to report a bug effectively. |
|
517 * Patches: Sending Patches. How to send a patch for Octave. |
|
518 |
|
519 Installing Octave |
|
520 |
|
521 * Installation Problems:: |
|
522 |
|
523 Emacs Octave Support |
|
524 |
|
525 * Installing EOS:: |
|
526 * Using Octave Mode:: |
|
527 * Running Octave From Within Emacs:: |
|
528 * Using the Emacs Info Reader for Octave:: |
|
529 |
|
530 Grammar |
|
531 |
|
532 * Keywords:: |
|
533 |
|
534 @end detailmenu |
3403
|
535 @end menu |
|
536 |
5424
|
537 @c ------------------------------------------------------------------------ |
|
538 |
3403
|
539 @include preface.texi |
|
540 @include intro.texi |
|
541 @include basics.texi |
|
542 @include data.texi |
|
543 @include numbers.texi |
|
544 @include strings.texi |
|
545 @include struct.texi |
3439
|
546 @include container.texi |
3403
|
547 @include var.texi |
|
548 @include expr.texi |
|
549 @include eval.texi |
|
550 @include stmt.texi |
|
551 @include func.texi |
|
552 @include errors.texi |
4167
|
553 @include debug.texi |
3403
|
554 @include io.texi |
|
555 @include plot.texi |
|
556 @include matrix.texi |
|
557 @include arith.texi |
6549
|
558 @include bit.texi |
3403
|
559 @include linalg.texi |
|
560 @include nonlin.texi |
5164
|
561 @include sparse.texi |
3403
|
562 @include quad.texi |
|
563 @include diffeq.texi |
|
564 @include optim.texi |
|
565 @include stats.texi |
3439
|
566 @include finance.texi |
3403
|
567 @include set.texi |
|
568 @include poly.texi |
6549
|
569 @include interp.texi |
6558
|
570 @include geometry.texi |
|
571 @include hash.texi |
3403
|
572 @include control.texi |
|
573 @include signal.texi |
|
574 @include image.texi |
|
575 @include audio.texi |
3452
|
576 @include quaternion.texi |
3403
|
577 @include system.texi |
6537
|
578 @include package.texi |
3403
|
579 |
|
580 @c maybe add again later, if anyone every writes any really interesting |
|
581 @c fun stuff for Octave. |
|
582 @c |
|
583 @c @include amuse.texi |
|
584 |
|
585 @c Appendices start here. Installation and bugs have to go before the |
|
586 @c readline and Info appendices because we want to have separate indices |
|
587 @c for them, and there appears to be no way to go back to the original |
|
588 @c set of indices once a redirection has taken place. |
|
589 |
5582
|
590 @include testfun.texi |
3403
|
591 @include tips.texi |
|
592 @include bugs.texi |
|
593 @include install.texi |
|
594 @include emacs.texi |
|
595 @include grammar.texi |
|
596 @include gpl.texi |
|
597 |
|
598 @include cp-idx.texi |
|
599 @include vr-idx.texi |
|
600 @include fn-idx.texi |
|
601 @include op-idx.texi |
|
602 |
|
603 @bye |