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:: |
3403
|
155 * Control Theory:: |
|
156 * Signal Processing:: |
|
157 * Image Processing:: |
|
158 * Audio Processing:: |
3452
|
159 * Quaternions:: |
3403
|
160 * System Utilities:: |
6537
|
161 * Packages:: |
5582
|
162 * Test and Demo Functions:: |
3403
|
163 * Tips:: |
|
164 * Trouble:: If you have trouble installing Octave. |
|
165 * Installation:: How to configure, compile and install Octave. |
|
166 * Emacs:: |
|
167 * Grammar:: |
|
168 * Copying:: The GNU General Public License. |
|
169 * Concept Index:: An item for each concept. |
|
170 * Variable Index:: An item for each documented variable. |
|
171 * Function Index:: An item for each documented function. |
|
172 * Operator Index:: An item for each documented operator. |
|
173 |
|
174 @detailmenu |
|
175 --- The Detailed Node Listing --- |
|
176 |
|
177 Preface |
|
178 |
3453
|
179 * Acknowledgements:: |
|
180 * How You Can Contribute to Octave:: |
|
181 * Distribution:: |
|
182 |
|
183 A Brief Introduction to Octave |
|
184 |
|
185 * Running Octave:: |
|
186 * Simple Examples:: |
|
187 * Conventions:: |
|
188 |
|
189 Conventions |
|
190 |
|
191 * Fonts:: |
|
192 * Evaluation Notation:: |
|
193 * Printing Notation:: |
|
194 * Error Messages:: |
|
195 * Format of Descriptions:: |
|
196 |
|
197 Format of Descriptions |
|
198 |
|
199 * A Sample Function Description:: |
|
200 * A Sample Command Description:: |
|
201 * A Sample Variable Description:: |
|
202 |
|
203 Getting Started |
|
204 |
|
205 * Invoking Octave:: |
|
206 * Quitting Octave:: |
|
207 * Getting Help:: |
|
208 * Command Line Editing:: |
|
209 * Errors:: |
|
210 * Executable Octave Programs:: |
|
211 * Comments:: |
|
212 |
|
213 Invoking Octave |
|
214 |
|
215 * Command Line Options:: |
|
216 * Startup Files:: |
|
217 |
|
218 Command Line Editing |
|
219 |
|
220 * Cursor Motion:: |
|
221 * Killing and Yanking:: |
|
222 * Commands For Text:: |
|
223 * Commands For Completion:: |
|
224 * Commands For History:: |
|
225 * Customizing readline:: |
|
226 * Customizing the Prompt:: |
|
227 * Diary and Echo Commands:: |
|
228 |
|
229 Data Types |
|
230 |
|
231 * Built-in Data Types:: |
|
232 * User-defined Data Types:: |
|
233 * Object Sizes:: |
|
234 |
|
235 Built-in Data Types |
|
236 |
|
237 * Numeric Objects:: |
|
238 * String Objects:: |
|
239 * Data Structure Objects:: |
|
240 |
|
241 Numeric Data Types |
|
242 |
|
243 * Matrices:: |
|
244 * Ranges:: |
6549
|
245 * Integer Data Types:: |
3453
|
246 * Logical Values:: |
|
247 * Predicates for Numeric Objects:: |
|
248 |
|
249 Matrices |
|
250 |
|
251 * Empty Matrices:: |
|
252 |
|
253 Strings |
|
254 |
|
255 * Creating Strings:: |
|
256 * Searching and Replacing:: |
|
257 * String Conversions:: |
|
258 * Character Class Functions:: |
|
259 |
6517
|
260 Cell Arrays |
3453
|
261 |
6517
|
262 * Creating Cell Arrays:: |
|
263 * Indexing Cell Arrays:: |
|
264 * Cell Arrays of Strings:: |
|
265 * Processing Data in Cell Arrays:: |
3453
|
266 |
|
267 Variables |
|
268 |
|
269 * Global Variables:: |
|
270 * Status of Variables:: |
|
271 * Summary of Built-in Variables:: |
|
272 * Defaults from the Environment:: |
|
273 |
|
274 Expressions |
|
275 |
|
276 * Index Expressions:: |
|
277 * Calling Functions:: |
|
278 * Arithmetic Ops:: |
|
279 * Comparison Ops:: |
|
280 * Boolean Expressions:: |
|
281 * Assignment Ops:: |
|
282 * Increment Ops:: |
|
283 * Operator Precedence:: |
|
284 |
|
285 Calling Functions |
|
286 |
|
287 * Call by Value:: |
|
288 * Recursion:: |
|
289 |
|
290 Boolean Expressions |
|
291 |
|
292 * Element-by-element Boolean Operators:: |
|
293 * Short-circuit Boolean Operators:: |
|
294 |
|
295 Statements |
|
296 |
|
297 * The if Statement:: |
|
298 * The switch Statement:: |
|
299 * The while Statement:: |
3489
|
300 * The do-until Statement:: |
3453
|
301 * The for Statement:: |
|
302 * The break Statement:: |
|
303 * The continue Statement:: |
|
304 * The unwind_protect Statement:: |
|
305 * The try Statement:: |
|
306 * Continuation Lines:: |
|
307 |
|
308 The @code{for} Statement |
|
309 |
|
310 * Looping Over Structure Elements:: |
|
311 |
|
312 Functions and Script Files |
|
313 |
|
314 * Defining Functions:: |
|
315 * Multiple Return Values:: |
|
316 * Variable-length Argument Lists:: |
|
317 * Variable-length Return Lists:: |
|
318 * Returning From a Function:: |
|
319 * Function Files:: |
|
320 * Script Files:: |
|
321 * Dynamically Linked Functions:: |
|
322 * Organization of Functions:: |
|
323 |
4178
|
324 Error Handling |
|
325 |
|
326 Debugging |
|
327 |
3453
|
328 Input and Output |
|
329 |
|
330 * Basic Input and Output:: |
|
331 * C-Style I/O Functions:: |
|
332 |
|
333 Basic Input and Output |
|
334 |
|
335 * Terminal Output:: |
|
336 * Terminal Input:: |
|
337 * Simple File I/O:: |
|
338 |
|
339 C-Style I/O Functions |
|
340 |
|
341 * Opening and Closing Files:: |
|
342 * Simple Output:: |
|
343 * Line-Oriented Input:: |
|
344 * Formatted Output:: |
|
345 * Output Conversion for Matrices:: |
|
346 * Output Conversion Syntax:: |
|
347 * Table of Output Conversions:: |
|
348 * Integer Conversions:: |
6554
|
349 * Floating-Point Conversions:: |
3453
|
350 * Other Output Conversions:: |
|
351 * Formatted Input:: |
|
352 * Input Conversion Syntax:: |
|
353 * Table of Input Conversions:: |
|
354 * Numeric Input Conversions:: |
|
355 * String Input Conversions:: |
|
356 * Binary I/O:: |
|
357 * Temporary Files:: |
|
358 * EOF and Errors:: |
|
359 * File Positioning:: |
|
360 |
|
361 Plotting |
|
362 |
|
363 * Two-Dimensional Plotting:: |
|
364 * Specialized Two-Dimensional Plots:: |
|
365 * Three-Dimensional Plotting:: |
|
366 * Plot Annotations:: |
|
367 * Multiple Plots on One Page:: |
|
368 * Multiple Plot Windows:: |
|
369 * Interaction with gnuplot:: |
|
370 |
|
371 Matrix Manipulation |
|
372 |
|
373 * Finding Elements and Checking Conditions:: |
|
374 * Rearranging Matrices:: |
6550
|
375 * Applying a Function to an Array:: |
3453
|
376 * Special Utility Matrices:: |
|
377 * Famous Matrices:: |
|
378 |
|
379 Arithmetic |
|
380 |
|
381 * Utility Functions:: |
|
382 * Complex Arithmetic:: |
|
383 * Trigonometry:: |
|
384 * Sums and Products:: |
|
385 * Special Functions:: |
|
386 * Mathematical Constants:: |
|
387 |
|
388 Linear Algebra |
|
389 |
6531
|
390 * Techniques used for Linear Algebra:: |
3453
|
391 * Basic Matrix Functions:: |
|
392 * Matrix Factorizations:: |
|
393 * Functions of a Matrix:: |
|
394 |
5164
|
395 Sparse Matrices |
|
396 |
|
397 * Basics:: |
|
398 * Sparse Linear Algebra:: |
|
399 * Iterative Techniques:: |
5648
|
400 * Real Life Example:: |
5164
|
401 * Oct-Files:: |
|
402 * Function Reference:: |
|
403 |
3453
|
404 Quadrature |
|
405 |
|
406 * Functions of One Variable:: |
|
407 * Orthogonal Collocation:: |
|
408 |
|
409 Differential Equations |
|
410 |
|
411 * Ordinary Differential Equations:: |
|
412 * Differential-Algebraic Equations:: |
|
413 |
|
414 Optimization |
|
415 |
|
416 * Quadratic Programming:: |
|
417 * Nonlinear Programming:: |
|
418 * Linear Least Squares:: |
|
419 |
|
420 Statistics |
|
421 |
|
422 * Basic Statistical Functions:: |
3489
|
423 * Tests:: |
3453
|
424 * Models:: |
|
425 * Distributions:: |
|
426 |
|
427 Control Theory |
|
428 |
|
429 * sysstruct:: |
|
430 * sysinterface:: |
|
431 * sysdisp:: |
|
432 * blockdiag:: |
|
433 * numerical:: |
|
434 * sysprop:: |
|
435 * systime:: |
|
436 * sysfreq:: |
|
437 * cacsd:: |
|
438 * misc:: |
|
439 |
|
440 System Data Structure |
|
441 |
|
442 * sysstructvars:: |
|
443 * sysstructtf:: |
|
444 * sysstructzp:: |
|
445 * sysstructss:: |
|
446 |
|
447 System Construction and Interface Functions |
|
448 |
|
449 * fir2sys:: |
|
450 * ss2sys:: |
|
451 * tf2sys:: |
|
452 * zp2sys:: |
|
453 * structaccess:: |
|
454 |
6535
|
455 Image Processing |
|
456 |
|
457 * Loading and Saving Images:: |
|
458 * Displaying Images:: |
|
459 * Representing Images:: |
|
460 * Plotting on top of Images:: |
|
461 * Color Conversion:: |
|
462 |
3453
|
463 System Utilities |
|
464 |
|
465 * Timing Utilities:: |
|
466 * Filesystem Utilities:: |
6549
|
467 * File Archiving Utilities:: |
|
468 * Networking Utilities:: |
3453
|
469 * Controlling Subprocesses:: |
|
470 * Process ID Information:: |
|
471 * Environment Variables:: |
|
472 * Current Working Directory:: |
|
473 * Password Database Functions:: |
|
474 * Group Database Functions:: |
|
475 * System Information:: |
|
476 |
6537
|
477 Packages |
|
478 |
|
479 * Installing and Removing Packages:: |
|
480 * Using Packages:: |
|
481 * Administrating Packages:: |
|
482 * Creating Packages:: |
|
483 * The DESCRIPTION File:: |
|
484 * The INDEX file:: |
|
485 * PKG_ADD and PKG_DEL directives:: |
|
486 |
5582
|
487 Test and Demo Functions |
|
488 |
|
489 * Test Functions:: |
|
490 * Demonstration Functions:: |
|
491 |
3453
|
492 Tips and Standards |
|
493 |
|
494 * Style Tips:: Writing clean and robust programs. |
|
495 * Coding Tips:: Making code run faster. |
|
496 * Documentation Tips:: Writing readable documentation strings. |
|
497 * Comment Tips:: Conventions for writing comments. |
|
498 * Function Headers:: Standard headers for functions. |
|
499 |
|
500 Known Causes of Trouble with Octave |
|
501 |
|
502 * Actual Bugs:: Bugs we will fix later. |
|
503 * Reporting Bugs:: |
|
504 * Bug Criteria:: |
|
505 * Bug Lists:: |
|
506 * Bug Reporting:: |
|
507 * Sending Patches:: |
|
508 * Service:: |
|
509 |
|
510 Reporting Bugs |
|
511 |
|
512 * Bug Criteria:: |
|
513 * Where: Bug Lists. Where to send your bug report. |
|
514 * Reporting: Bug Reporting. How to report a bug effectively. |
|
515 * Patches: Sending Patches. How to send a patch for Octave. |
|
516 |
|
517 Installing Octave |
|
518 |
|
519 * Installation Problems:: |
|
520 |
|
521 Emacs Octave Support |
|
522 |
|
523 * Installing EOS:: |
|
524 * Using Octave Mode:: |
|
525 * Running Octave From Within Emacs:: |
|
526 * Using the Emacs Info Reader for Octave:: |
|
527 |
|
528 Grammar |
|
529 |
|
530 * Keywords:: |
|
531 |
|
532 @end detailmenu |
3403
|
533 @end menu |
|
534 |
5424
|
535 @c ------------------------------------------------------------------------ |
|
536 |
3403
|
537 @include preface.texi |
|
538 @include intro.texi |
|
539 @include basics.texi |
|
540 @include data.texi |
|
541 @include numbers.texi |
|
542 @include strings.texi |
|
543 @include struct.texi |
3439
|
544 @include container.texi |
3403
|
545 @include var.texi |
|
546 @include expr.texi |
|
547 @include eval.texi |
|
548 @include stmt.texi |
|
549 @include func.texi |
|
550 @include errors.texi |
4167
|
551 @include debug.texi |
3403
|
552 @include io.texi |
|
553 @include plot.texi |
|
554 @include matrix.texi |
|
555 @include arith.texi |
6549
|
556 @include bit.texi |
3403
|
557 @include linalg.texi |
|
558 @include nonlin.texi |
5164
|
559 @include sparse.texi |
3403
|
560 @include quad.texi |
|
561 @include diffeq.texi |
|
562 @include optim.texi |
|
563 @include stats.texi |
3439
|
564 @include finance.texi |
3403
|
565 @include set.texi |
|
566 @include poly.texi |
6549
|
567 @include interp.texi |
3403
|
568 @include control.texi |
|
569 @include signal.texi |
|
570 @include image.texi |
|
571 @include audio.texi |
3452
|
572 @include quaternion.texi |
3403
|
573 @include system.texi |
6537
|
574 @include package.texi |
3403
|
575 |
|
576 @c maybe add again later, if anyone every writes any really interesting |
|
577 @c fun stuff for Octave. |
|
578 @c |
|
579 @c @include amuse.texi |
|
580 |
|
581 @c Appendices start here. Installation and bugs have to go before the |
|
582 @c readline and Info appendices because we want to have separate indices |
|
583 @c for them, and there appears to be no way to go back to the original |
|
584 @c set of indices once a redirection has taken place. |
|
585 |
5582
|
586 @include testfun.texi |
3403
|
587 @include tips.texi |
|
588 @include bugs.texi |
|
589 @include install.texi |
|
590 @include emacs.texi |
|
591 @include grammar.texi |
|
592 @include gpl.texi |
|
593 |
|
594 @include cp-idx.texi |
|
595 @include vr-idx.texi |
|
596 @include fn-idx.texi |
|
597 @include op-idx.texi |
|
598 |
|
599 @bye |