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