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