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