FOSS computer math solutions. Part 1 - Octave
Octave - A high-level language mainly intended for mathematical calculations. The syntax is similar to the Matlab syntax, moreover, it fully supports it (well, Matlab, of course, does not always support the Octave syntax).
Supports graphing using GNUPlot.
There are versions for both * nix systems and Windows.
For KDE there is KOctave - a graphic frontend, maybe there is something similar for the other WM / DE / systems.
A little more detailed:
If you know what Matlab can do, you can imagine what Octave can do, although of course its functionality is somewhat less specific areas (Who doesn’t know, Matlab has all sorts of extensions necessary for areas ranging from linguistics to astrophysics)
The syntax is quite pleasant, logical: you can declare your functions, you can create files that are functions at once and call them simply by the file name.
In addition, there is a normal mode - the command line mode of operation.
Here is the first example that comes up to determine the factorial function (although it is already in the octave without it):
############################### #########################################
usage: answer = lg_factorial4 (n)
##
## Returns the factorial of n (n!). n should be a positive
## integer or 0.
function answer = lg_factorial4 (n)
if (nargin! = 1)
usage ("factorial (n)");
elseif (! isscalar (n) ||! isreal (n))
error ("n must be a positive integer value");
elseif (n <0)
error ("there is no definition for negative factorials");
endif
if (n == 0)
answer = 1;
return
else
answer = prod (1: n);
endif
endfunction
#################################################### ###################
graphics are drawn in the same way as in matlab - you need two vectors of the same length, and then just “plot”
############ #################
x = linspace (0, 2 * pi, 100);
y = sin (x);
plot (x, y);
###############################
PS Read more here:Octave: Getting started
PPS, this note was written rather simply to inform that there is a free open analogue of matlab, which basically works almost the same and is almost completely compatible with it. there are very few differences:
1) there is no support for functions in functions
2) there is no support for "object-oriented classes with overloading"
3) there is NOT a small (very small) number of basic functions (gui, dll, java, activex, dde, web, and serial functions ), without which you can completely do as for me.
4) you cannot compile code into binaries
*) some Octave functions are not supported by matlab.
**) In an octave, you can index any object and not just variables
***) In the octave there are operators "++", "-", "- =", "+ =",
****) There are differences in the use of double and single quotes for strings
*****) octave draws graphs with GNUPlot
Supports graphing using GNUPlot.
There are versions for both * nix systems and Windows.
For KDE there is KOctave - a graphic frontend, maybe there is something similar for the other WM / DE / systems.
A little more detailed:
If you know what Matlab can do, you can imagine what Octave can do, although of course its functionality is somewhat less specific areas (Who doesn’t know, Matlab has all sorts of extensions necessary for areas ranging from linguistics to astrophysics)
The syntax is quite pleasant, logical: you can declare your functions, you can create files that are functions at once and call them simply by the file name.
In addition, there is a normal mode - the command line mode of operation.
Here is the first example that comes up to determine the factorial function (although it is already in the octave without it):
############################### #########################################
usage: answer = lg_factorial4 (n)
##
## Returns the factorial of n (n!). n should be a positive
## integer or 0.
function answer = lg_factorial4 (n)
if (nargin! = 1)
usage ("factorial (n)");
elseif (! isscalar (n) ||! isreal (n))
error ("n must be a positive integer value");
elseif (n <0)
error ("there is no definition for negative factorials");
endif
if (n == 0)
answer = 1;
return
else
answer = prod (1: n);
endif
endfunction
#################################################### ###################
graphics are drawn in the same way as in matlab - you need two vectors of the same length, and then just “plot”
############ #################
x = linspace (0, 2 * pi, 100);
y = sin (x);
plot (x, y);
###############################
PS Read more here:Octave: Getting started
PPS, this note was written rather simply to inform that there is a free open analogue of matlab, which basically works almost the same and is almost completely compatible with it. there are very few differences:
1) there is no support for functions in functions
2) there is no support for "object-oriented classes with overloading"
3) there is NOT a small (very small) number of basic functions (gui, dll, java, activex, dde, web, and serial functions ), without which you can completely do as for me.
4) you cannot compile code into binaries
*) some Octave functions are not supported by matlab.
**) In an octave, you can index any object and not just variables
***) In the octave there are operators "++", "-", "- =", "+ =",
****) There are differences in the use of double and single quotes for strings
*****) octave draws graphs with GNUPlot