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.
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 DMelt data analysis program. Every script that is posted on this tutorial can be ran inside DMelt in the GUI or a batch mode. You can also use a smaller version of this program using download page.
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:
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:
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 ”;”
You can also print numbers using formatted outputs.
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”
Just to show the power of the symbolic calculations, let take definite integral of :
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:which has non-activated [Run] button.
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:
To run a MatLab like script (with the extension “m”), use loadfile functions:
jMathLab is a part of the DataMelt 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 DataMelt.
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