G-Octave currently includes a number of functions not distributed with Octave (although some of them probably will be in the future). All of them should reside in a directory /usr/share/goctave/m/ after you "make install". Please note that although some of these are specifically related to G-Octave and its user interface, most of them are simple functions that I wrote for my own personal library and have included here because it is the easiest way to distribute them.
Outputs:
NUMBER COLOR
0 BLACK
1 RED
2 GREEN
3 BROWN
4 BLUE
5 VIOLET
6 TEAL
7 GRAY
Inputs:
Outputs:
Evaluates an expression for given variable values. This function is an improvement over the eval() because you can give it variables and values to use for them. Note that you can also include calls to other functions inside your expression.
Inputs:
Outputs:
octave:35> eval_eq("floor(x) - 3*y", "x", 3.4, "y", 2)
ans = -3
Smooths a data set, using an exponential smoothing algorithm. This technique is generally used to smooth time-series information so it is easier to spot long-term trends.
The smoothing constant, k, is a number between 0 and 1 exclusive. The lower this constant, the more smoothing is done.
It should be possible to use this function to smooth out colors in a bitmap image, for instance by smoothing first rows, then columns of pixels in a "plaid" pattern. I have never tried this, however.
Inputs:
Outputs:
Inputs:
Outputs:
Inputs:
Outputs:
Inputs:
Outputs:
Calls Maxima and has it evaluate expression. Multiple commands can be passed, and separated with semi-colons. If invoked without arguments, opens a Maxima session (type quit(); to return to Goctave).
Obviously, this function is not going to do anything if you do not have Maxima installed on your machine.
Inputs:
Known Problems:
Example:
octave:2> maxima ("integrate(x*sin(x), x);")
(D1) SIN(x) - x COS(x)
octave:3> maxima("3/4 + 1/2;")
5
(D1) -
4
Inputs:
Outputs:
Inputs:
Outputs:
Example
octave:1> m = rand(10,1) m = 0.445231 0.084164 0.283295 0.191321 0.573918 0.261156 0.695213 0.571522 0.955541 0.696154 octave:2> stemleaf(m, .1) ans = 0 | 8 1 | 9 2 | 6 8 4 | 4 5 | 7 7 6 | 9 9 9 | 5 n = 10, stem unit = 0.1
Inputs:
Outputs:
Example
octave:12> m m = 4 7 7 6 5 9 9 0 3 2 6 8 2 5 3 4 4 9 5 3 octave:13> sortrows(m) ans = 9 9 0 3 2 6 8 2 5 3 4 7 7 6 5 4 4 9 5 3
Inputs:
Outputs: