What text editor to use in combination with GNU Octave?
The natural choice is, of course, GNU Emacs, or if you are so inclined, vim.
What GUI or IDE can I use to replace the proprietary one, to smooth over transition pains?
This is asked frequently so here you go with a list of Octave front-ends:
Note
These front-ends are not supported by the GNU Octave project! Don't write to the GNU Octave mailing list praising them. Thank you!
I'm running some m-file that prints things as it moves along, but I don't get to see any of that until the m-file is finished. How do I make the output show up immediately?
GNU Octave by default buffers all output and sends them to a pager. If you want to disable paging try calling more off or page_screen_output (0).
Tip
The pager used is determined by the PAGER environment variable.
I'm using typeinfo (x), and...
typeinfo (x) is used to debug the interpreter. Use class (x) to determine the value's class, which is probably what you wanted to do.
I don't understand how to use that a(:, 1:2:10) indexing stuff?
It says 3 * 0.1 != 0.3, why is that so?
Because internally, computers use a format (binary floating-point) that cannot accurately represent a number like 0.1, 0.2 or 0.3 at all.
When the code is interpreted, your “0.1” is already rounded to the nearest number in that format, which results in a small rounding error even before the calculation happens.
Why do computers use such a stupid system?
It’s not stupid, just different. Decimal numbers cannot accurately represent a number like 1/3, so you have to round to something like 0.33 - and you don’t expect 0.33 + 0.33 + 0.33 to add up to 1, either - do you?
Computers use binary numbers because they’re faster at dealing with those, and because for most calculations, a tiny error in the 17th decimal place doesn’t matter at all since the numbers you work with aren’t round (or that precise) anyway.
Note
See <http://floating-point-gui.de/> for more information. It is also where these two friendly answers were taken from.
I'm running Windows and plotting doesn't work!
Try removing oct2mat.
How do I remove oct2mat?
Unload oct2mat if currently loaded:
pkg unload oct2mat
And if that solves you problem, you might want to make Octave remember not to load oct2mat at startup:
pkg rebuild -noauto oct2mat
I have this bug in a specific function, ...
Try running:
pkg unload all
If that unloads your function (i.e. it's not available anymore), it's not a GNU Octave function. It's probably part of OctaveForge, so you better file a bug report with them.
Note
GNU Octave only contains the core functionality of the Octave language with a core library of functions. OctaveForge is a separate project that maintains packages with extra functions (roughly mimicking "toolboxes" of the proprietary software).
While there are communication between the two projects (obviously), GNU Octave is much stricter in accepting new functions, especially in terms of code quality and syntax. Therefore, it's very helpful to send the messages to the right people, the GNU Octave people don't really know about OctaveForge internals and vice versa.
I have this bug and I want to know if anyone else sees this?
How do I register for being a developer?
I want to hack on GNU Octave! Give me something to do!
I suggest you try cloning the octave repository and make it build. Particularly interesting (as there is lot of demand for this from users) is plotting and bug fixing (of course!).
There's some more or less heavy ideas in the PROJECTS file.
Remember, Octave is built by volunteers and if you want to contribute, just write some code (preferably fixing a bug) and send it in (to the bug tracker at bug.octave.org). There are instructions in the manual. This is absolutely the best way of getting attention. Talking is nice and all, but code means business.
Tip
If you feel more like writing Octave code (.m) or auxiliary functions then you might want to consider OctaveForge (which is not this place), and improving packages there.
I want a pointer to the underlying chunk of memory the Matrix object stores its data in. Is there a way to do this?
These functions are part of the Array<T> class:
const T * data (void) const const T * fortran_vec (void) const T * fortran_vec (void)
And Matrix inherits from Array<double> (via MArray<double>).
Here's a small example:
Matrix mymatrix (4, 4); double * ptr; ptr = mymatrix.fortran_vec (); for (int i = 0; i < 16; i++) ptr[i] = i; const double * cptr; cptr = mymatrix.fortran_vec (); // or data () for (int i = 0; i < 16; i++) printf ("%1.0f, ", cptr[i]);
Licensed under CC-AT 3.0 or later <http://creativecommons.org/licenses/by/3.0/>. Don't ask me, just use it.