[ Home | GAUSS | GAUSS Engine | GAUSS Apps | 3rd Party Apps | Keywords Index ]

Language Extension

This example shows how Symbolic Tools extends the GAUSS language. Symbolic values returned to GAUSS are represented as strings. Symbolic values evaluated in the Maple kernel at some value and returned to GAUSS are evaluated numerically.

library symbolic; // define the library
call symstate(reset);

// turns on symbolic processing

//Language Extension
xm = rndu(3,4);
xnorm = symmaple("norm(xm)",0); //infinity norm

"\n norm(xm): " xnorm;

let xm[2,2] = 1 0 3 2;
xjord = symmaple("jordan(xm)",0); //Jordan form
"\n jordan(xm): " xjord;
let xm[2,2] = 1.5 2 2.2 2.5;
xzeta = symmaple("Zeta(xm)",1); // Riemann Zeta function
"\n Zeta(xm): " xzeta;

The symmaple command allows GAUSS to access any Maple function, and returns the numeric result to GAUSS.  The second parameter tells Maple whether the argument is a matrix or not.

The output from this example is :

norm(xm): 3.0956951

jordan(xm):
1.0000000 0.00000000
0.00000000 2.0000000

Zeta(xm):
2.6123753 1.6449341
1.4905433 1.3414873