2866
|
1 \input texinfo.tex @c -*-texinfo-*- |
|
2 |
3030
|
3 @setfilename Octave-FAQ.info |
2866
|
4 @settitle Frequently asked questions about Octave (with answers) |
|
5 |
|
6 @setchapternewpage off |
|
7 |
|
8 @titlepage |
|
9 @title Octave FAQ |
|
10 @subtitle Frequently asked questions about Octave |
3154
|
11 @subtitle February 14, 1998 |
2866
|
12 @sp 1 |
|
13 @author John W. Eaton |
|
14 @page |
|
15 @end titlepage |
|
16 |
|
17 @ifinfo |
4830
|
18 @node Top |
2866
|
19 @top |
|
20 @unnumbered Preface |
|
21 @cindex FAQ for Octave, latest version |
|
22 @end ifinfo |
|
23 |
|
24 This is a list of frequently asked questions (FAQ) for Octave users. |
|
25 |
|
26 Some information in this FAQ was written for earlier versions of |
|
27 Octave and may now be obsolete. |
|
28 |
5041
|
29 I'm looking for new questions (@emph{with} answers), better answers, or |
|
30 both. Please send suggestions to bug@@octave.org. If you have general |
|
31 questions about Octave, or need help for something that is not covered |
|
32 by the Octave manual or the FAQ, please use the help@@octave.org mailing |
|
33 list. |
2866
|
34 |
|
35 This FAQ is intended to supplement, not replace, the Octave manual. |
|
36 Before posting a question to the help-octave mailing list, you should |
|
37 first check to see if the topic is covered in the manual. |
|
38 |
|
39 @menu |
|
40 * What is Octave?:: |
4830
|
41 * How can I cite Octave?:: |
|
42 * Version 2.0:: |
2866
|
43 * Octave Features:: |
|
44 * Documentation:: |
|
45 * Getting Octave:: |
|
46 * Installation:: |
|
47 * Common problems:: |
|
48 * Getting additional help:: |
|
49 * Bug reports:: |
|
50 * MATLAB compatibility:: |
|
51 * Index:: |
|
52 @end menu |
|
53 |
4830
|
54 @node What is Octave? |
2866
|
55 @chapter What is Octave? |
|
56 |
|
57 Octave is a high-level interactive language, primarily intended for |
|
58 numerical computations that is mostly compatible with |
|
59 @sc{Matlab}.@footnote{@sc{Matlab} is a registered trademark of The MathWorks, |
|
60 Inc.} |
|
61 |
|
62 Octave can do arithmetic for real and complex scalars and matrices, |
|
63 solve sets of nonlinear algebraic equations, integrate functions over |
|
64 finite and infinite intervals, and integrate systems of ordinary |
|
65 differential and differential-algebraic equations. |
|
66 |
|
67 Octave uses the GNU readline library to handle reading and editing |
|
68 input. By default, the line editing commands are similar to the |
|
69 cursor movement commands used by GNU Emacs, and a vi-style line |
|
70 editing interface is also available. At the end of each session, the |
|
71 command history is saved, so that commands entered during previous |
|
72 sessions are not lost. |
|
73 |
|
74 The Octave distribution includes a 200+ page Texinfo manual. Access |
|
75 to the complete text of the manual is available via the help command |
|
76 at the Octave prompt. |
|
77 |
|
78 Two and three dimensional plotting is fully supported using gnuplot. |
|
79 |
|
80 The underlying numerical solvers are currently standard Fortran ones |
|
81 like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library |
|
82 of C++ classes. If possible, the Fortran subroutines are compiled |
|
83 with the system's Fortran compiler, and called directly from the C++ |
|
84 functions. If that's not possible, you can still compile Octave if |
|
85 you have the free Fortran to C translator f2c. |
|
86 |
|
87 Octave is also free software; you can redistribute it and/or modify it |
|
88 under the terms of the GNU General Public License as published by the |
|
89 Free Software Foundation. |
|
90 |
4830
|
91 @node How can I cite Octave? |
|
92 @chapter How can I cite Octave? |
4831
|
93 |
|
94 Pointing to @url{http://www.octave.org} is good, because that gives |
|
95 people a direct way to find out more. If citation of a URL is not |
|
96 allowed by a publisher, or if you also want to point to a traditional |
|
97 reference, then you can cite the Octave manual: |
4830
|
98 |
|
99 @example |
|
100 @group |
4831
|
101 @@BOOK@{eaton:2002, |
4830
|
102 author = "John W. Eaton", |
|
103 title = "GNU Octave Manual", |
|
104 publisher = "Network Theory Limited", |
|
105 year = "2002", |
|
106 isbn = "0-9541617-2-6" |
4831
|
107 @} |
4830
|
108 @end group |
|
109 @end example |
|
110 |
|
111 @node Version 2.0 |
2866
|
112 @chapter What's new in version 2.0 of Octave |
|
113 |
3154
|
114 Version 2.0.10 of Octave was released February 6, 1998. Most bugs |
|
115 reported since version 2.0 was release have been fixed, and a number of |
|
116 new features have been added. Octave is now much more compatible with |
|
117 @sc{Matlab}. |
2866
|
118 |
|
119 A list of user-visible changes in recent versions of Octave may be found |
|
120 in the file NEWS, distributed in both source and binary releases of |
|
121 Octave. |
|
122 |
4830
|
123 @node Octave Features |
2866
|
124 @chapter What features are unique to Octave? |
|
125 |
|
126 @menu |
|
127 * Command and variable name completion:: |
|
128 * Command history:: |
|
129 * Data structures:: |
|
130 * Short-circuit boolean operators:: |
|
131 * Increment and decrement operators:: |
|
132 * Unwind-protect:: |
|
133 * Variable-length argument lists:: |
|
134 * Variable-length return lists:: |
|
135 * Built-in ODE and DAE solvers:: |
|
136 @end menu |
|
137 |
4830
|
138 @node Command and variable name completion |
2866
|
139 @section Command and variable name completion |
|
140 |
|
141 @cindex Command completion |
|
142 @cindex Function name completion |
|
143 @cindex Variable name completion |
|
144 @cindex Name completion |
|
145 |
|
146 Typing a TAB character (ASCII code 9) on the command line causes Octave |
|
147 to attempt to complete variable, function, and file names. Octave uses |
|
148 the text before the cursor as the initial portion of the name to |
|
149 complete. |
|
150 |
|
151 For example, if you type @samp{fu} followed by TAB at the Octave prompt, |
|
152 Octave will complete the rest of the name @samp{function} on the command |
|
153 line (unless you have other variables or functions defined that begin |
|
154 with the characters @samp{fu}). If there is more than one possible |
|
155 completion, Octave will ring the terminal bell to let you know that your |
|
156 initial sequence of characters is not enough to specify a unique name. |
|
157 To complete the name, you may either edit the initial character sequence |
|
158 (usually adding more characters until completion is possible) or type |
|
159 another TAB to cause Octave to display the list of possible completions. |
|
160 |
4830
|
161 @node Command history |
2866
|
162 @section Command history |
|
163 |
|
164 @cindex Command history |
|
165 @cindex History |
|
166 |
|
167 When running interactively, Octave saves the commands you type in an |
|
168 internal buffer so that you can recall and edit them. Emacs and vi |
|
169 editing modes are available with Emacs keybindings enabled by default. |
|
170 |
|
171 When Octave exits, the current command history is saved to the file |
|
172 @file{~/.octave_hist}, and each time Octave starts, it inserts the |
|
173 contents of the @file{~/.octave_hist} file in the history list so that |
|
174 it is easy to begin working where you left off. |
|
175 |
4830
|
176 @node Data structures |
2866
|
177 @section Data structures |
|
178 |
|
179 @cindex Data structures |
|
180 @cindex Structures |
|
181 |
|
182 Octave includes a limited amount of support for organizing data in |
|
183 structures. The current implementation uses an associative array |
|
184 with indices limited to strings, but the syntax is more like C-style |
|
185 structures. Here are some examples of using data structures in Octave. |
|
186 |
|
187 @itemize @bullet |
|
188 @item Elements of structures can be of any value type. |
|
189 |
|
190 @example |
|
191 @group |
|
192 octave:1> x.a = 1; x.b = [1, 2; 3, 4]; x.c = "string"; |
|
193 octave:2> x.a |
|
194 x.a = 1 |
|
195 octave:3> x.b |
|
196 x.b = |
|
197 |
|
198 1 2 |
|
199 3 4 |
|
200 |
|
201 octave:4> x.c |
|
202 x.c = string |
|
203 @end group |
|
204 @end example |
|
205 |
|
206 @item Structures may be copied. |
|
207 |
|
208 @example |
|
209 @group |
|
210 octave:1> y = x |
|
211 y = |
|
212 @{ |
|
213 a = 1 |
|
214 b = |
|
215 |
|
216 1 2 |
|
217 3 4 |
|
218 |
|
219 c = string |
|
220 s = |
|
221 |
|
222 0.00000 0.00000 0.00000 |
|
223 0.00000 5.46499 0.00000 |
|
224 0.00000 0.00000 0.36597 |
|
225 |
|
226 u = |
|
227 |
|
228 -0.40455 -0.91451 |
|
229 -0.91451 0.40455 |
|
230 |
|
231 v = |
|
232 |
|
233 -0.57605 0.81742 |
|
234 -0.81742 -0.57605 |
|
235 @} |
|
236 @end group |
|
237 @end example |
|
238 |
|
239 @item Structure elements may reference other structures. |
|
240 |
|
241 @example |
|
242 @group |
|
243 octave:1> x.b.d = 3 |
|
244 x.b.d = 3 |
|
245 octave:2> x.b |
|
246 ans = |
|
247 @{ |
|
248 d = 3 |
|
249 @} |
|
250 octave:3> x.b.d |
|
251 ans = 3 |
|
252 @end group |
|
253 @end example |
|
254 |
|
255 @item Functions can return structures. |
|
256 |
|
257 @example |
|
258 @group |
|
259 octave:1> function y = f (x) |
|
260 > y.re = real (x); |
|
261 > y.im = imag (x); |
|
262 > endfunction |
|
263 |
|
264 octave:2> f (rand + rand*I); |
|
265 ans = |
|
266 @{ |
|
267 im = 0.18033 |
|
268 re = 0.19069 |
|
269 @} |
|
270 @end group |
|
271 @end example |
|
272 |
|
273 @item Function return lists can include structure elements, and they may |
|
274 be indexed like any other variable. |
|
275 |
|
276 @example |
|
277 @group |
|
278 octave:1> [x.u, x.s(2:3,2:3), x.v] = svd ([1, 2; 3, 4]); |
|
279 octave:2> x |
|
280 x = |
|
281 @{ |
|
282 s = |
|
283 |
|
284 0.00000 0.00000 0.00000 |
|
285 0.00000 5.46499 0.00000 |
|
286 0.00000 0.00000 0.36597 |
|
287 |
|
288 u = |
|
289 |
|
290 -0.40455 -0.91451 |
|
291 -0.91451 0.40455 |
|
292 |
|
293 v = |
|
294 |
|
295 -0.57605 0.81742 |
|
296 -0.81742 -0.57605 |
|
297 @} |
|
298 @end group |
|
299 @end example |
|
300 |
|
301 @item You can also use the function @code{is_struct} to determine |
|
302 whether a given value is a data structure. For example |
|
303 |
|
304 @example |
|
305 is_struct (x) |
|
306 @end example |
|
307 |
|
308 @noindent |
|
309 returns 1 if the value of the variable @var{x} is a data structure. |
|
310 @end itemize |
|
311 |
|
312 This feature should be considered experimental, but you should expect it |
|
313 to work. Suggestions for ways to improve it are welcome. |
|
314 |
4830
|
315 @node Short-circuit boolean operators |
2866
|
316 @section Short-circuit boolean operators |
|
317 |
|
318 @cindex Boolean operators, short-circuit |
|
319 @cindex Logical operators, short-circuit |
|
320 @cindex Short-circuit boolean operators |
|
321 @cindex Operators, boolean |
|
322 |
|
323 Octave's @samp{&&} and @samp{||} logical operators are evaluated in |
|
324 a short-circuit fashion (like the corresponding operators in the C |
|
325 language) and work differently than the element by element operators |
|
326 @samp{&} and @samp{|}. |
|
327 |
4830
|
328 @node Increment and decrement operators |
2866
|
329 @section Increment and decrement operators |
|
330 |
|
331 @cindex Increment operators |
|
332 @cindex Decrement operators |
|
333 @cindex Operators, increment |
|
334 @cindex Operators, decrement |
|
335 |
|
336 Octave includes the C-like increment and decrement operators @samp{++} |
|
337 and @samp{--} in both their prefix and postfix forms. |
|
338 |
|
339 For example, to pre-increment the variable @var{x}, you would write |
|
340 @code{++@var{x}}. This would add one to @var{x} and then return the new |
|
341 value of @var{x} as the result of the expression. It is exactly the |
|
342 same as the expression @code{@var{x} = @var{x} + 1}. |
|
343 |
|
344 To post-increment a variable @var{x}, you would write @code{@var{x}++}. |
|
345 This adds one to the variable @var{x}, but returns the value that |
|
346 @var{x} had prior to incrementing it. For example, if @var{x} is equal |
|
347 to 2, the result of the expression @code{@var{x}++} is 2, and the new |
|
348 value of @var{x} is 3. |
|
349 |
|
350 For matrix and vector arguments, the increment and decrement operators |
|
351 work on each element of the operand. |
|
352 |
|
353 It is not currently possible to increment index expressions. For |
|
354 example, you might expect that the expression @code{@var{v}(4)++} would |
|
355 increment the fourth element of the vector @var{v}, but instead it |
|
356 results in a parse error. This problem may be fixed in a future |
|
357 release of Octave. |
|
358 |
4830
|
359 @node Unwind-protect |
2866
|
360 @section Unwind-protect |
|
361 |
|
362 @cindex Unwind-protect |
|
363 |
|
364 Octave supports a limited form of exception handling modelled after the |
|
365 unwind-protect form of Lisp. The general form of an |
|
366 @code{unwind_protect} block looks like this: |
|
367 |
|
368 @example |
|
369 @group |
|
370 unwind_protect |
|
371 @var{body} |
|
372 unwind_protect_cleanup |
|
373 @var{cleanup} |
|
374 end_unwind_protect |
|
375 @end group |
|
376 @end example |
|
377 |
|
378 @noindent |
|
379 Where @var{body} and @var{cleanup} are both optional and may contain any |
|
380 Octave expressions or commands. The statements in @var{cleanup} are |
|
381 guaranteed to be executed regardless of how control exits @var{body}. |
|
382 |
|
383 The @code{unwind_protect} statement is often used to reliably restore |
|
384 the values of global variables that need to be temporarily changed. |
|
385 |
4830
|
386 @node Variable-length argument lists |
2866
|
387 @section Variable-length argument lists |
|
388 |
|
389 @cindex Variable-length argument lists |
|
390 @cindex Argument lists, variable-length |
|
391 |
|
392 Octave has a real mechanism for handling functions that take an |
|
393 unspecified number of arguments, so it is no longer necessary to place |
|
394 an upper bound on the number of optional arguments that a function can |
|
395 accept. |
|
396 |
|
397 Here is an example of a function that uses the new syntax to print a |
|
398 header followed by an unspecified number of values: |
|
399 |
|
400 @example |
|
401 @group |
|
402 function foo (heading, ...) |
|
403 disp (heading); |
|
404 va_start (); |
|
405 while (--nargin) |
|
406 disp (va_arg ()); |
|
407 endwhile |
|
408 endfunction |
|
409 @end group |
|
410 @end example |
|
411 |
|
412 Calling @code{va_start()} positions an internal pointer to the first |
|
413 unnamed argument and allows you to cycle through the arguments more than |
|
414 once. It is not necessary to call @code{va_start()} if you do not plan |
|
415 to cycle through the arguments more than once. |
|
416 |
|
417 The function @code{va_arg()} returns the value of the next available |
|
418 argument and moves the internal pointer to the next argument. It is an |
|
419 error to call @code{va_arg()} when there are no more arguments |
|
420 available. |
|
421 |
|
422 It is also possible to use the keyword @var{all_va_args} to pass all |
|
423 unnamed arguments to another function. |
|
424 |
4830
|
425 @node Variable-length return lists |
2866
|
426 @section Variable-length return lists |
|
427 |
|
428 @cindex Variable-length return lists |
|
429 @cindex Return lists, variable-length |
|
430 |
|
431 Octave also has a real mechanism for handling functions that return an |
|
432 unspecified number of values, so it is no longer necessary to place an |
|
433 upper bound on the number of outputs that a function can produce. |
|
434 |
|
435 Here is an example of a function that uses the new syntax to produce |
|
436 @samp{N} values: |
|
437 |
|
438 @example |
|
439 @group |
|
440 function [...] = foo (n) |
|
441 for i = 1:n |
|
442 vr_val (i); |
|
443 endfor |
|
444 endfunction |
|
445 @end group |
|
446 @end example |
|
447 |
4830
|
448 @node Built-in ODE and DAE solvers |
2866
|
449 @section Built-in ODE and DAE solvers |
|
450 |
|
451 @cindex DASSL |
|
452 @cindex LSODE |
|
453 |
|
454 Octave includes LSODE and DASSL for solving systems of stiff ordinary |
|
455 differential and differential-algebraic equations. These functions are |
|
456 built in to the interpreter. |
|
457 |
4830
|
458 @node Documentation |
2866
|
459 @chapter What documentation exists for Octave? |
|
460 |
|
461 @cindex Octave, documentation |
|
462 |
|
463 The Octave distribution includes a 220+ page manual that is also |
|
464 distributed under the terms of the GNU GPL. |
|
465 |
|
466 The Octave manual is intended to be a complete reference for Octave, but |
|
467 it is not a finished document. If you have problems using it, or find |
|
468 that some topic is not adequately explained, indexed, or |
5041
|
469 cross-referenced, please send a bug report to bug@@octave.org. |
2866
|
470 |
|
471 Because the Octave manual is written using Texinfo, the complete text of |
|
472 the Octave manual is also available on line using the GNU Info system |
|
473 via the GNU Emacs, info, or xinfo programs, or by using the @samp{help -i} |
|
474 command to start the GNU info browser directly from the Octave prompt. |
|
475 |
|
476 It is also possible to use your favorite WWW browser to read the Octave |
3154
|
477 manual by converting the Texinfo source to HTML using the |
|
478 @code{texi2html} program. |
2866
|
479 |
4830
|
480 @node Getting Octave |
2866
|
481 @chapter Obtaining Source Code |
|
482 |
|
483 @cindex Source code |
|
484 |
|
485 @menu |
|
486 * Octave for Unix:: |
|
487 * Octave for other platforms:: |
|
488 * latest versions:: |
|
489 @end menu |
|
490 |
4830
|
491 @node Octave for Unix |
2866
|
492 @section How do I get a copy of Octave for Unix? |
|
493 |
|
494 You can get Octave from a friend who has a copy, by anonymous FTP, or by |
|
495 ordering a tape or CD-ROM from the Free Software Foundation (FSF). |
|
496 |
|
497 @cindex Octave, ordering |
|
498 @cindex Octave, getting a copy |
|
499 |
|
500 Octave was not developed by the FSF, but the FSF does distribute Octave, |
|
501 and the developers of Octave support the efforts of the FSF by |
3154
|
502 encouraging users of Octave to order Octave on CD-ROM directly from |
2866
|
503 the FSF. |
|
504 |
|
505 The FSF is a nonprofit organization that distributes software and |
3154
|
506 manuals to raise funds for more GNU development. Buying a CD-ROM from |
|
507 the FSF contributes directly to paying staff to develop GNU software. |
|
508 CD-ROMs cost $240 if an organization is buying, or $60 if an individual |
|
509 is buying. |
2866
|
510 |
|
511 @cindex FSF [Free Software Foundation] |
|
512 @cindex GNU [GNU's not unix] |
|
513 |
|
514 For more information about ordering from the FSF, contact |
3154
|
515 gnu@@gnu.org, phone (617) 542-5942 or anonymous ftp the file |
|
516 @file{/pub/gnu/GNUinfo/ORDERS} from ftp.gnu.org. |
2866
|
517 |
3285
|
518 @cindex FSF, contact <gnu@@gnu.org> |
2866
|
519 @cindex GNUware, anonymous FTP sites |
|
520 |
|
521 If you are on the Internet, you can copy the latest distribution |
|
522 version of Octave from the file @file{/pub/octave/octave-M.N.tar.gz}, on |
|
523 the host @file{ftp.che.wisc.edu}. This tar file has been compressed |
|
524 with GNU gzip, so be sure to use binary mode for the transfer. @samp{M} |
|
525 and @samp{N} stand for version numbers; look at a listing of the |
|
526 directory through ftp to see what version is available. After you |
|
527 unpack the distribution, be sure to look at the files @file{README} and |
|
528 @file{INSTALL}. |
|
529 |
|
530 Binaries for several popular systems are also available. If you would |
|
531 like help out by making binaries available for other systems, please |
5041
|
532 contact bug@@octave.org. |
2866
|
533 |
|
534 A list of user-visible changes since the last release is available in |
|
535 the file @file{NEWS}. The file @file{ChangeLog} in the source |
|
536 distribution contains a more detailed record of changes made since the |
|
537 last release. |
|
538 |
4830
|
539 @node Octave for other platforms |
2866
|
540 @section How do I get a copy of Octave for (some other platform)? |
|
541 |
|
542 @cindex VMS support |
|
543 @cindex VAX |
|
544 @cindex MS-DOS support |
3154
|
545 @cindex Windows support |
2866
|
546 @cindex DJGPP |
|
547 @cindex EMX |
|
548 @cindex OS/2 support |
|
549 |
3154
|
550 Octave currently runs on Unix-like systems, OS/2, and Windows NT/95 |
3840
|
551 (using the Cygwin tools from Red Hat). It should be possible |
3154
|
552 to make Octave work on other systems as well. If you are interested in |
|
553 porting Octave to other systems, please contact |
5041
|
554 bug@@octave.org. |
2866
|
555 |
4830
|
556 @node latest versions |
2866
|
557 @section What is the latest version of Octave |
|
558 |
|
559 @cindex Octave, version date |
|
560 |
3154
|
561 The latest version of Octave is 2.0.10, released February 6, 1998. |
2866
|
562 |
4830
|
563 @node Installation |
2866
|
564 @chapter Installation Issues and Problems |
|
565 |
|
566 @cindex Octave, building |
|
567 |
3154
|
568 Octave requires approximately 125MB of disk storage to unpack and |
|
569 compile from source (significantly less if you don't compile with |
|
570 debugging symbols or create shared libraries). Once installed, Octave |
|
571 requires approximately 65MB of disk space (again, considerably less if |
|
572 you don't build shared libraries or the binaries and libraries do not |
|
573 include debugging symbols). |
2866
|
574 |
|
575 @menu |
|
576 * What else do I need?:: |
|
577 * Other C++ compilers?:: |
|
578 @end menu |
|
579 |
4830
|
580 @node What else do I need? |
2866
|
581 @section What else do I need? |
|
582 |
|
583 @cindex GNU gcc |
|
584 @cindex GNU g++ |
|
585 @cindex libg++ |
|
586 @cindex GNU Make |
|
587 @cindex Flex |
|
588 @cindex GNU Bison |
|
589 |
3154
|
590 To compile Octave, you will need a recent version of GNU Make. You |
|
591 will also need g++ 2.7.2 or later. Version 2.8.0 or egcs 1.0.x should |
|
592 work. Later versions may work, but C++ is still evolving, so don't be |
|
593 too surprised if you run into some trouble. |
|
594 |
|
595 It is no longer necessary to have libg++, but you do need to have the |
|
596 GNU implementation of libstdc++. If you are using g++ 2.7.2, |
|
597 libstdc++ is distributed along with libg++, but for later versions, |
|
598 libstdc++ is distributed separately. For egcs, libstdc++ is included |
|
599 with the compiler distribution. |
|
600 |
|
601 <em>You must have gnu make to compile octave</em>. Octave's Makefiles |
|
602 use features of GNU Make that are not present in other versions of make. |
|
603 GNU Make is very portable and easy to install. |
2866
|
604 |
4830
|
605 @node Other C++ compilers? |
2866
|
606 @section Can I compile Octave with another C++ compiler? |
|
607 |
|
608 Currently, Octave can only be compiled with the GNU C++ compiler. It |
|
609 would be nice to make it possible to compile Octave with other C++ |
|
610 compilers, but the maintainers do not have sufficient time to devote to |
|
611 this. If you are interested in working to make Octave portable to other |
5041
|
612 compilers, please contact bug@@octave.org. |
2866
|
613 |
4830
|
614 @node Common problems |
2866
|
615 @chapter Common problems |
|
616 |
|
617 This list is probably far too short. Feel free to suggest additional |
|
618 questions (preferably with answers!) |
|
619 |
|
620 @itemize @bullet |
|
621 @item |
|
622 Octave takes a long time to find symbols. |
|
623 |
|
624 Octave is probably spending this time recursively searching directories |
|
625 for function files. Check the value of your LOADPATH. For those |
|
626 elements that end in @samp{//}, do any name a very large directory tree? |
|
627 Does it contain directories that have a mixture of files and |
|
628 directories? In order for the recursive directory searching code to |
|
629 work efficiently, directories that are to be searched recursively should |
|
630 have either function files only, or subdirectories only, but not a |
|
631 mixture of both. Check to make sure that Octave's standard set of |
|
632 function files is installed this way. |
|
633 @end itemize |
|
634 |
4830
|
635 @node Getting additional help |
2866
|
636 @chapter Getting additional help |
|
637 |
|
638 @cindex Additional help |
|
639 @cindex Mailing lists, help-octave |
|
640 |
|
641 The mailing list |
|
642 |
|
643 @example |
5041
|
644 help@@octave.org |
2866
|
645 @end example |
|
646 |
|
647 @noindent |
|
648 is available for questions related to using, installing, and porting |
|
649 Octave that are not adequately answered by the Octave manual or by this |
|
650 document. |
|
651 |
|
652 If you would like to join the discussion and receive all messages sent |
|
653 to the list, please send a short note to |
|
654 |
|
655 @example |
|
656 @group |
5041
|
657 help-request@@octave.org |
|
658 ^^^^^^^ |
2866
|
659 @end group |
|
660 @end example |
|
661 |
|
662 @strong{Please do not} send requests to be added or removed from the the |
|
663 mailing list, or other administrative trivia to the list itself. |
|
664 |
|
665 An archive of old postings to the help-octave mailing list is maintained |
|
666 on ftp.che.wisc.edu in the directory @file{/pub/octave/MAILING-LISTS}. |
|
667 |
4830
|
668 @node Bug reports |
2866
|
669 @chapter I think I have found a bug in Octave. |
|
670 |
|
671 @cindex Bug in Octave, newly found |
|
672 |
|
673 ``I think I have found a bug in Octave, but I'm not sure. How do I know, |
|
674 and who should I tell?'' |
|
675 |
|
676 @cindex Manual, for Octave |
|
677 |
|
678 First, see the section on bugs and bug reports in the Octave manual. |
|
679 The Octave manual is included in the Octave distribution. |
|
680 |
|
681 When you report a bug, make sure to describe the type of computer you |
|
682 are using, the version of the operating system it is running, and the |
|
683 version of Octave that you are using. Also provide enough code so that |
|
684 the Octave maintainers can duplicate your bug. |
|
685 |
|
686 If you have Octave working at all, the easiest way to do this is to use |
|
687 the Octave function @code{bug_report}. When you execute this function, |
|
688 Octave will prompt you for a subject and then invoke the editor on a |
|
689 file that already contains all the configuration information. When you |
|
690 exit the editor, Octave will mail the bug report for you. |
|
691 |
|
692 @cindex Octave bug report |
|
693 @cindex Mailing lists, bug-octave |
|
694 |
|
695 If for some reason you cannot use Octave's @code{bug_report} function, |
5041
|
696 mail your bug report to "bug@@octave.org". Your message needs to |
|
697 include enough information to allow the maintainers of Octave to fix the |
|
698 bug. Please read the section on bugs and bug reports in the Octave |
|
699 manual for a list of things that should be included in every bug report. |
2866
|
700 |
4830
|
701 @node MATLAB compatibility |
2866
|
702 @chapter Porting programs from @sc{Matlab} to Octave |
|
703 |
|
704 @cindex @sc{Matlab} compatibility |
|
705 @cindex Compatibility with @sc{Matlab} |
|
706 |
|
707 ``I wrote some code for @sc{Matlab}, and I want to get it running under |
|
708 Octave. Is there anything I should watch out for?'' |
|
709 |
|
710 The differences between Octave and @sc{Matlab} typically fall into one of |
|
711 three categories: |
|
712 |
|
713 @enumerate |
|
714 @item |
|
715 Irrelevant. |
|
716 |
|
717 @item |
|
718 Known differences, perhaps configurable with a user preference variable. |
|
719 |
|
720 @item |
|
721 Unknown differences. |
|
722 @end enumerate |
|
723 |
|
724 The first category, irrelevant differences, do not affect computations |
|
725 and most likely do not affect the execution of function files. |
|
726 |
|
727 The differences of the second category are usually because the authors |
|
728 of Octave decided on a better (subjective) implementation that the way |
|
729 @sc{Matlab} does it, and so introduced ``user preference variables'' so that |
|
730 you can customize Octave's behavior to be either @sc{Matlab}-compatible or |
|
731 to use Octave's new features. To make Octave more @sc{Matlab}-compatible, |
|
732 put the following statements in your @file{~/.octaverc} file, or use the |
|
733 command line option @samp{--traditional}, which implies all of these |
|
734 settings. Note that this list may not be complete, because some new |
|
735 variables may have been introduced since this document was last updated. |
|
736 |
|
737 @example |
|
738 @group |
4455
|
739 PS1 = ">> " |
|
740 PS2 = "" |
|
741 beep_on_error = true |
|
742 crash_dumps_octave_core = false |
|
743 default_save_format = "mat-binary" |
|
744 fixed_point_format = true |
|
745 page_screen_output = false |
|
746 print_empty_dimensions = false |
|
747 warn_function_name_clash = false |
2866
|
748 @end group |
|
749 @end example |
|
750 |
|
751 Some other known differences are: |
|
752 |
|
753 @itemize @bullet |
|
754 @item |
|
755 The Octave plotting functions are mostly compatible with the ones from |
|
756 @sc{Matlab} 3.x, but not from @sc{Matlab} 4.x. |
|
757 @end itemize |
|
758 |
|
759 The third category of differences is (hopefully) shrinking. If you find |
|
760 a difference between Octave behavior and @sc{Matlab}, then you should send a |
|
761 description of this difference (with code illustrating the difference, |
5041
|
762 if possible) to bug@@octave.org. |
2866
|
763 |
|
764 An archive of old postings to the Octave mailing lists is maintained |
|
765 on ftp.che.wisc.edu in the directory @file{/pub/octave/MAILING-LISTS}. |
|
766 |
4830
|
767 @node Index |
2866
|
768 @appendix Concept Index |
|
769 |
|
770 @printindex cp |
|
771 |
|
772 @page |
|
773 @contents |
|
774 @bye |