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