DMelt:JMathlab/1 Introduction

From HandWiki
Limitted access. First login to DataMelt if you are a full DataMelt member. Then login to HandWiki as a user.

Introduction to jMathLab

This section represents a short non-interactive introduction. This manual is based on the Jasymca manual, but includes some new features offered by the jMathLab project.

Start the DataMelt IDE and click on the tab "SymbolicShell". Check the help (type "help") and look at the demo (type "demo"). It is a rather powerful calculator which can be used for symbolic (and numeric) integration, differentiation, solving linear and non-linear equations, plotting functions and much more.

You can read the manual typing :help" in the "SymbolicShell". This gives you ideas on how to use symbolic calculations interactively.

Below we will illustrate how to write a macro in Octave or Matlab syntax and execute such macro. Make a file called "example.m" using the Matlab or Octave syntax and with the lines:


Save this file. Then run it by pressing the "Run" button on the toolbar of DataMelt. One can also use the //'[F8]//' key. You will see the graph (text output will be shown in the interactive shells below the editor).

There is another way to execute it. Tell to the SymbolicShell in which directory to find this file:


(here we assume that directory is "/home/sergei/". Now type the name of the file (without the extension), i.e. "example". You will see a function plotted by the shell

And here is the nice part: you can open the file "example.m" in the DataMelt editor and edit it as you like (File-Open). The DataMelt IDE will recognize this as Octave/Matlab file. Then save this file and again execute the command "example" from the SymbolicShell. An updated script will be executed again.

jMathLab starts up in Octave-mode. Commands are entered using the keyboard in the text input field in the lower part of the window. The results are displayed and saved in the upper large textarea. The zoom-function in the mainmenu adjusts font size. The buttons < and > recall earlier commands (scrolling the command history). The same operation is achieved by typing the arrow keys of the keyboard, and is an important aid for efficient working.