You are a guest. Restricted access. Read more

jMathLab Tutorial

This tutorial is fully interactive and it is powered by Java. Please select Always trust content from this publisher when you will see a pop-up window. Please wait while the Java downloading the library for this tutorial. If Java is not installed, you still can see the examples, but they will be interactive.

About

jMathLab is a clone of Matlab and Octave written in Java. Unlike Matlab, it's free. Unlike Octave, it is available on all platforms where Java is installed. You can also run it using the Web browser. The web page of jMathLab is here. From this web page you can access the reference manual for all functions included with this program (limited access for non-members).

The program is also a part of the SCaVis data analysis program. You can also use a smaller version of this program using download page.

How to use this tutorial

Left window is a code editor which can be used to type commands in the Matlab/Octave syntax. Press the [Run] button on the right to run these commands and to see the output. The output will be shown on the right window. You can change the divider location using the mouse. Let's get familiar with the interactive prompt. Type:


disp('message');

and press [Run]. You will see “message”. Try to change the divider position with the mouse. This means that you can talk to the interactive shell. In fact, now you have learned how to print a string (“ok”). For example, let's print ok on different lines using “\n” as a separator:


disp('message\n message') %   comment

where ”%” indicates your comment for this code. Again, press [Run]. You will see a pop-up window with the 3 lines of “ok”. The reason why you got a pop-up window instead inline output, is because the text did not fit to the on-line window. You can type several commands on one line, but separated them with ”;”


disp('ok'); disp('ok'); disp('ok'); % comment

You can also print numbers using formatted outputs.


printf('%f',100)  %  you can edit this command and run it

In some cases you can edit an example and run the modified code. In such cases, you will see a green border around the code. In the example below, please try to change '100' to other number and press “Run”


printf('%f',100) % you can edit this command and run it

Just to show the power of the symbolic calculations, let take definite integral of x^2+x-3:


syms x
a=integrate(x^2+x-3,x)
printf('%f',a)

If you are not a registered member, you cannot run the code and cannot see the outputs. But you can still read this manual. For example, non-members will see the following code example:


disp('ok') %  show how to print 2, but cannot see it (non-member)

which has non-activated [Run] button.

Version information

To determine the version of information, type “version” ([ENTER]). You will see a pop-up window which shows the version number and the build date Check this out by running this code:


version

Running scripts

To run a MatLab like script (with the extension “m”), use loadfile functions:


loadfile("/home/myfile.m")

Using a standalone application

jMathLab is a part of the SCaVis project. But you can download the standalone application to work with jMathLab which is only 2MB in size. This application runs on any computer (Windows, Linux, Mac). However, you should be a full member of SCaVis.

This box indicates that you are not a full member.

One can comment and discuss this section after becoming a full member.

Credits

The jMathLab is a derivative of two Java programs: JMathLib and Jasymca. Both are GNU-licensed thus jMathLab is also distributed under the GNU public license. Thus we fully acknowledge contributions to this project by H. Dersch (HFU Furtwangen), S.Müller and other who contributed to this project by licensing their code by GNU

You could leave a comment if you were logged in.
jmathlab/start.txt · Last modified: 2013/04/14 16:52 (external edit)
Back to top
CC Attribution-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0