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