6778
|
1 % Copyright (C) 1996, 1997, 2007 John W. Eaton |
3403
|
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 |
6778
|
61 Copyright (C) 1996, 1997, 2007 John W. Eaton. |
3403
|
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} |
6778
|
88 @subtitle July 2007 |
3403
|
89 @author John W. Eaton |
6966
|
90 @author David Bateman |
|
91 @author S@o{}ren Hauberg |
3403
|
92 @page |
|
93 @vskip 0pt plus 1filll |
6778
|
94 Copyright @copyright{} 1996, 1997, 2007 John W. Eaton. |
3403
|
95 |
|
96 This is the third edition of the Octave documentation, and is consistent |
|
97 with version @value{VERSION} of Octave. |
|
98 |
|
99 Permission is granted to make and distribute verbatim copies of |
|
100 this manual provided the copyright notice and this permission notice |
|
101 are preserved on all copies. |
|
102 |
|
103 Permission is granted to copy and distribute modified versions of this |
|
104 manual under the conditions for verbatim copying, provided that the entire |
|
105 resulting derived work is distributed under the terms of a permission |
|
106 notice identical to this one. |
|
107 |
|
108 Permission is granted to copy and distribute translations of this manual |
|
109 into another language, under the same conditions as for modified versions. |
|
110 |
|
111 Portions of this document have been adapted from the @code{gawk}, |
|
112 @code{readline}, @code{gcc}, and C library manuals, published by the Free |
5307
|
113 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
114 02110-1301--1307, USA. |
3403
|
115 @end titlepage |
|
116 |
3606
|
117 @contents |
|
118 |
5423
|
119 @ifnottex |
4167
|
120 @node Top |
3403
|
121 @top |
|
122 |
|
123 This manual documents how to run, install and port GNU Octave, as well |
|
124 as its new features and incompatibilities, and how to report bugs. |
|
125 It corresponds to GNU Octave version @value{VERSION}. |
5423
|
126 @end ifnottex |
3403
|
127 |
5424
|
128 @c ------------------------------------------------------------------------ |
|
129 |
3403
|
130 @menu |
|
131 * Preface:: |
|
132 * Introduction:: A brief introduction to Octave. |
|
133 * Getting Started:: |
|
134 * Data Types:: |
|
135 * Numeric Data Types:: |
|
136 * Strings:: |
6837
|
137 * Data Containers:: |
3403
|
138 * Variables:: |
|
139 * Expressions:: Expressions. |
|
140 * Evaluation:: |
|
141 * Statements:: Looping and program flow control. |
|
142 * Functions and Scripts:: |
6667
|
143 * Errors and Warnings:: |
4178
|
144 * Debugging:: |
3403
|
145 * Input and Output:: |
|
146 * Plotting:: |
|
147 * Matrix Manipulation:: |
|
148 * Arithmetic:: |
|
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:: |
6781
|
253 * Bit Manipulations:: |
3453
|
254 * Logical Values:: |
|
255 * Predicates for Numeric Objects:: |
|
256 |
|
257 Matrices |
|
258 |
|
259 * Empty Matrices:: |
|
260 |
|
261 Strings |
|
262 |
|
263 * Creating Strings:: |
6623
|
264 * Comparing Strings:: |
|
265 * Manipulating Strings:: |
3453
|
266 * String Conversions:: |
|
267 * Character Class Functions:: |
|
268 |
6837
|
269 Data Containers |
3453
|
270 |
6837
|
271 * Data Structures:: |
|
272 * Cell Arrays:: |
|
273 * Comma Separated Lists:: |
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 |
6888
|
377 * Plotting Basics:: |
|
378 * Advanced Plotting:: |
3453
|
379 |
|
380 Matrix Manipulation |
|
381 |
|
382 * Finding Elements and Checking Conditions:: |
|
383 * Rearranging Matrices:: |
6550
|
384 * Applying a Function to an Array:: |
3453
|
385 * Special Utility Matrices:: |
|
386 * Famous Matrices:: |
|
387 |
|
388 Arithmetic |
|
389 |
|
390 * Utility Functions:: |
|
391 * Complex Arithmetic:: |
|
392 * Trigonometry:: |
|
393 * Sums and Products:: |
|
394 * Special Functions:: |
|
395 * Mathematical Constants:: |
|
396 |
|
397 Linear Algebra |
|
398 |
6531
|
399 * Techniques used for Linear Algebra:: |
3453
|
400 * Basic Matrix Functions:: |
|
401 * Matrix Factorizations:: |
|
402 * Functions of a Matrix:: |
|
403 |
5164
|
404 Sparse Matrices |
|
405 |
|
406 * Basics:: |
|
407 * Sparse Linear Algebra:: |
|
408 * Iterative Techniques:: |
5648
|
409 * Real Life Example:: |
5164
|
410 |
6741
|
411 Numerical Integration |
3453
|
412 |
|
413 * Functions of One Variable:: |
|
414 * Orthogonal Collocation:: |
6741
|
415 * Functions of Multiple Variables:: |
3453
|
416 |
|
417 Differential Equations |
|
418 |
|
419 * Ordinary Differential Equations:: |
|
420 * Differential-Algebraic Equations:: |
|
421 |
|
422 Optimization |
|
423 |
|
424 * Quadratic Programming:: |
|
425 * Nonlinear Programming:: |
|
426 * Linear Least Squares:: |
|
427 |
|
428 Statistics |
|
429 |
6754
|
430 * Descriptive Statistics:: |
|
431 * Basic Statistical Functions:: |
|
432 * Statistical Plots:: |
3489
|
433 * Tests:: |
3453
|
434 * Models:: |
6754
|
435 * Distributions:: |
|
436 * Random Number Generation:: |
3453
|
437 |
6741
|
438 Sets |
|
439 |
|
440 * Set Operations:: |
|
441 |
6850
|
442 Polynomial Manipulations |
|
443 |
|
444 * Evaluating Polynomials:: |
|
445 * Finding Roots:: |
|
446 * Products of Polynomials:: |
|
447 * Derivatives and Integrals:: |
|
448 * Polynomial Interpolation:: |
|
449 * Miscellaneous Functions:: |
|
450 |
6702
|
451 Interpolation |
6823
|
452 |
6702
|
453 * One-dimensional Interpolation:: |
|
454 * Multi-dimensional Interpolation:: |
6570
|
455 |
6823
|
456 Geometry |
|
457 |
|
458 * Delaunay Triangulation:: |
|
459 * Voronoi Diagrams:: |
|
460 * Convex Hull:: |
|
461 * Interpolation on Scattered Data:: |
|
462 |
3453
|
463 Control Theory |
|
464 |
|
465 * sysstruct:: |
|
466 * sysinterface:: |
|
467 * sysdisp:: |
|
468 * blockdiag:: |
|
469 * numerical:: |
|
470 * sysprop:: |
|
471 * systime:: |
|
472 * sysfreq:: |
|
473 * cacsd:: |
|
474 * misc:: |
|
475 |
|
476 System Data Structure |
|
477 |
|
478 * sysstructvars:: |
|
479 * sysstructtf:: |
|
480 * sysstructzp:: |
|
481 * sysstructss:: |
|
482 |
|
483 System Construction and Interface Functions |
|
484 |
|
485 * fir2sys:: |
|
486 * ss2sys:: |
|
487 * tf2sys:: |
|
488 * zp2sys:: |
|
489 * structaccess:: |
|
490 |
6535
|
491 Image Processing |
|
492 |
|
493 * Loading and Saving Images:: |
|
494 * Displaying Images:: |
|
495 * Representing Images:: |
|
496 * Plotting on top of Images:: |
|
497 * Color Conversion:: |
|
498 |
3453
|
499 System Utilities |
|
500 |
|
501 * Timing Utilities:: |
|
502 * Filesystem Utilities:: |
6549
|
503 * File Archiving Utilities:: |
|
504 * Networking Utilities:: |
3453
|
505 * Controlling Subprocesses:: |
|
506 * Process ID Information:: |
|
507 * Environment Variables:: |
|
508 * Current Working Directory:: |
|
509 * Password Database Functions:: |
|
510 * Group Database Functions:: |
|
511 * System Information:: |
6702
|
512 * Hashing Functions:: |
3453
|
513 |
6537
|
514 Packages |
|
515 |
|
516 * Installing and Removing Packages:: |
|
517 * Using Packages:: |
|
518 * Administrating Packages:: |
|
519 * Creating Packages:: |
|
520 * The DESCRIPTION File:: |
|
521 * The INDEX file:: |
|
522 * PKG_ADD and PKG_DEL directives:: |
|
523 |
6570
|
524 Dynamically Linked Functions |
|
525 |
|
526 * Oct-Files:: |
|
527 * Mex-Files:: |
|
528 * Standalone Programs:: |
|
529 |
5582
|
530 Test and Demo Functions |
|
531 |
|
532 * Test Functions:: |
|
533 * Demonstration Functions:: |
|
534 |
3453
|
535 Tips and Standards |
|
536 |
|
537 * Style Tips:: Writing clean and robust programs. |
|
538 * Coding Tips:: Making code run faster. |
|
539 * Documentation Tips:: Writing readable documentation strings. |
|
540 * Comment Tips:: Conventions for writing comments. |
|
541 * Function Headers:: Standard headers for functions. |
|
542 |
|
543 Known Causes of Trouble with Octave |
|
544 |
|
545 * Actual Bugs:: Bugs we will fix later. |
|
546 * Reporting Bugs:: |
|
547 * Bug Criteria:: |
|
548 * Bug Lists:: |
|
549 * Bug Reporting:: |
|
550 * Sending Patches:: |
|
551 * Service:: |
|
552 |
|
553 Reporting Bugs |
|
554 |
|
555 * Bug Criteria:: |
|
556 * Where: Bug Lists. Where to send your bug report. |
|
557 * Reporting: Bug Reporting. How to report a bug effectively. |
|
558 * Patches: Sending Patches. How to send a patch for Octave. |
|
559 |
|
560 Installing Octave |
|
561 |
|
562 * Installation Problems:: |
|
563 |
|
564 Emacs Octave Support |
|
565 |
|
566 * Installing EOS:: |
|
567 * Using Octave Mode:: |
|
568 * Running Octave From Within Emacs:: |
|
569 * Using the Emacs Info Reader for Octave:: |
|
570 |
6623
|
571 @c Grammar |
6624
|
572 @c |
|
573 @c * Keywords:: |
3453
|
574 |
|
575 @end detailmenu |
3403
|
576 @end menu |
|
577 |
5424
|
578 @c ------------------------------------------------------------------------ |
|
579 |
3403
|
580 @include preface.texi |
|
581 @include intro.texi |
|
582 @include basics.texi |
|
583 @include data.texi |
|
584 @include numbers.texi |
|
585 @include strings.texi |
3439
|
586 @include container.texi |
3403
|
587 @include var.texi |
|
588 @include expr.texi |
|
589 @include eval.texi |
|
590 @include stmt.texi |
|
591 @include func.texi |
|
592 @include errors.texi |
4167
|
593 @include debug.texi |
3403
|
594 @include io.texi |
|
595 @include plot.texi |
|
596 @include matrix.texi |
|
597 @include arith.texi |
|
598 @include linalg.texi |
|
599 @include nonlin.texi |
5164
|
600 @include sparse.texi |
3403
|
601 @include quad.texi |
|
602 @include diffeq.texi |
|
603 @include optim.texi |
|
604 @include stats.texi |
3439
|
605 @include finance.texi |
3403
|
606 @include set.texi |
|
607 @include poly.texi |
6549
|
608 @include interp.texi |
6558
|
609 @include geometry.texi |
3403
|
610 @include control.texi |
|
611 @include signal.texi |
|
612 @include image.texi |
|
613 @include audio.texi |
3452
|
614 @include quaternion.texi |
3403
|
615 @include system.texi |
6537
|
616 @include package.texi |
3403
|
617 |
|
618 @c maybe add again later, if anyone every writes any really interesting |
|
619 @c fun stuff for Octave. |
|
620 @c |
|
621 @c @include amuse.texi |
|
622 |
|
623 @c Appendices start here. Installation and bugs have to go before the |
|
624 @c readline and Info appendices because we want to have separate indices |
|
625 @c for them, and there appears to be no way to go back to the original |
|
626 @c set of indices once a redirection has taken place. |
|
627 |
6570
|
628 @include dynamic.texi |
5582
|
629 @include testfun.texi |
3403
|
630 @include tips.texi |
|
631 @include bugs.texi |
|
632 @include install.texi |
|
633 @include emacs.texi |
6618
|
634 @c @include grammar.texi |
3403
|
635 @include gpl.texi |
|
636 |
|
637 @include cp-idx.texi |
|
638 @include vr-idx.texi |
|
639 @include fn-idx.texi |
|
640 @include op-idx.texi |
|
641 |
|
642 @bye |