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