Algae ![]() |
http://algae.sourceforge.net |
Beschreibung: | Algae is an interpreted language for numerical analysis and
matrix processing, similar to Octave or MATLAB. Algae is said to be
very fast. It is free software under the GNU General Public
License.
Some facts:
|
Hello World | Michael Neumann |
# Hello World in Algae printf("Hello World\n"); |
Gibt "Hello World" auf dem Bildschirm
aus. |
Misc | Michael Neumann |
# fill(shape; values) fill(3,4; 1,2,3,4) # => 3x4 matrix filled (row-wise) with 1,2,3,4 diag(1,2,3) # 3x3 matix with 1,2,3 on the diagonal # linspace(a; b; n) linspace(1;10;100) creates a vector with 100 elements from 1 to 10 # ident(n) # creates the nxn identity matrix |
Squares (1) | Michael Neumann |
# Note that functions can be applied to scalars as well as to vectors or matrices squares = function(x) { return x^2; } nums = 1:10:1; # a vector containing elements from 1 to 10 print( squares(nums) ); # or ... print( nums^2 ); |
Gibt die Quadrate von 1 bis 10
aus. |
Squares (2) | Michael Neumann |
for (i in 1:10) { printf("%d "; i^2); } printf("\n"); |
Gibt die Quadrate von 1 bis 10
aus. |