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