Tutorial:JMathLab/Downloads

From HandWiki

You can download an application which can be used to run code example on your computer using this information. You will be instructed how to run this program in a stand-alone mode, using a jMath Console (interactive shell) and how to use a shell prompt version (without GUI).

<ifauth ns="learn">

You can download an application which can be used to run code example on your computer using this link.

Simply download this jar file and click on it (using Windows) or run it as

java -jar jwork-jmathlab.jar

using Linux/Mac. Of course, Java should be installed.

To run it in interactive mode (console), use this:

java -cp .:jwork-jmathlab.jar jmathlab.GUI 

If you have Matlab file (extension .m), you can run in a console way (without GUI) as:

java -jar jwork-jmathlab.jar  file.m

Try this example for file.m file:

% Demo 
p = 5000;
printf("Welcome to the Live-Demonstration of Jasymca\n");
pause(200);
printf("Interrupt anytime using Control-c or Menu: Interrupt.\n");
printf("\n\n");
pause(2000);
printf("Jasymca is an interactive Symbolic Calculator\n");
pause(2000);
printf("Originally developed by Helmut Dersch (2006, 2009). \n Repacked & corrected by S.Chekanov (2011)\n");
pause(2000);
printf("\n\n\n");
pause(2000);
printf("Use % for comments");
pause(1000);
printf("\n");
pause(2000);
printf("Calculate mathematical expressions\n");
printf(">>2^75-1\n");
format short;
2^75-1,
pause(p);
printf("\n\n\n");
printf("Calculations use 15-16 decimal digits.\n");
printf(">>format long\n");
format long;
printf(">>2^75-1\n");
2^75-1,
pause(p);
printf("\n\n\n");
printf("or they are exact if 'rat' is used:\n");
printf(">>rat(2)^75-1\n");
rat(2)^75-1,
pause(p);
printf("\n\n\n");
printf("Decompose into primes:\n");
printf(">>primes( ans )\n");
primes(ans),
pause(p);
printf("\n\n\n");
printf("Control: multiply primes:\n");
printf(">>prod( ans )\n");
prod( ans ),
pause(p);
format short;
printf("\n\n\n");
printf("Greatest common denominator:\n");
printf(">>gcd(289169475515192951703861, 2891694755151939166450249891702715)\n");
gcd(289169475515192951703861, 2891694755151939166450249891702715),
pause(p);
printf("\n\n\n");
printf("works also with symbolic expressions:\n");
printf(">>syms x,z\n");
syms x,z
printf(">>gcd(z*x^5-z, x^2-2*x+1)\n");
gcd(z*x^5-z,x^2-2*x+1),
pause(p);
printf("\n\n\n");
printf("Symbolic polynomials;\n");
printf(">> syms x\n");
syms x
printf(">> y=(x-1)*(x+2)*(x-1/3)*(x+25)\n");
y=(x-1)*(x+2)*(x-1/3)*(x+25),
pause(p);
printf("\n\n\n");
printf("Finding roots;\n");
printf(">> allroots( y )\n");
allroots( y ),
pause(p);
printf("\n\n\n");
printf("Decompose complex expressions:\n");
printf(">> syms x;\n");
syms x;
printf(">> y=(3+i*x)/(2-i*x)\n");
y=(3+i*x)/(2-i*x),
pause(p);
printf("\n\n\n");
printf("Into realpart:\n");
printf(">> realpart(y)\n");
realpart(y),
pause(p);
printf("\n\n\n");
printf("and imaginary part:\n");
printf(">> imagpart(y)\n");
imagpart(y),
pause(p);
printf("\n\n\n");
printf("Working with matrices:\n");
printf(">> A = hilb(4)\n");
A = hilb(4),
pause(p);
printf("\n\n\n");
printf("Inverse:\n");
printf(">> B = inv(A)\n");
B = inv(A),
pause(p);
printf("\n\n\n");
printf("Multiplication:\n");
printf(">> B * A\n");
B * A,
pause(p);


Note on the license:

The program is licensed by the GNU public license. It contains the following RSyntaxTextArea (modified BSD license) package and Jasymca (GNU public license). Please ask learn@jwork.org for other details or the source code.