carre bleu
carre jaune

Examples of MUSTIG programs
The examples below are extremely simple, but they allow to understand the "philosophy" of the MUSTIG language. The principles shown here remain valid for much more complex algorithms.


1. Construction of a noisy sinusoid and estimation of its spectrum

All the modules are slided using the mouse from MUSTIG's standard Library into the programming window. They may be unlocked and modified to fit your needs exactly.

We start by defining a vector signal, referred to by a variable named t which contains 256 samples. The default sampling frequency is 1Hz and may be changed as required by your application.

Using this support variable we build :

  • A sinusoid : its frequency, phase and amplitude are set by double-clicking on the box
  • A white noise of variance 1, which we multiply by a adjustable scalar gain

All we have to do then is add the noise to the sine wave to obtain a noisy sinusoid. We then calculate the Fourier Transform of this signal, which changes the time variable t into the frequency variable f, and view its squared modulus. The look of the curve (symbols, line style, colors, grid, size, etc.) is fully modifiable using the mouse.


2. Multidimensional aspect of MUSTIG : vectorizing the parameters of an algorithm

We want to estimate the spectrum with three different values of the noise gain. In MUSTIG language it is not necessary to explicitly write a loop or manually execute the program several times. All we have to do is define the noise gain not as a scalar any more, but as a new dimension, referred to by a variable named noise and containing three values.

When the MUSTIG compiler processes the adder, it understands that the noise is now a two-dimensional signal. The output of the adder is thus a two-dimensional signal as well, made of the same pure sine wave added to THREE different proportional noise signals.

The calculation of the spectrum is thus automatically carried out on the three signals produced by the adder. Even though the algorithm was originally designed for one signal, you may run it on several test signals at a time without changing anything !

The three calculated spectra are viewed with a dedicated module : they allow to quickly estimate the effect of the noise level on our algorithm.


3. User-friendliness & interactivity : MUSTIG's " front panels "

The three modules {sine wave + noise + scalar gain} form a coherent set. It is logical to gather them into a single module named, for example, Generator. Such custom modules are called macros in MUSTIG language. They are created in the twinkling of an eye by just selecting the elements and hitting a keyboard shortcut.

Then, the elements you want to quickly have access to can be simply "Drag&Drop"-ed from the program onto the generator's front panel. In the example below, the frequency of the sine wave has been slided onto the front panel, so that the frequency of the output signal can easily be modified from there. An hyperlink is created between the frequency input module in the program and its image on the front panel.

This possibility of quickly creating image hyperlinks between the MUSTIG program and several front panels is valid for all the MUSTIG modules : the graphical window associated to the Visu_2D_n viewing module has been inserted into its own front panel to allow rapidly checking the obtained results.


4. More interactivity : MUSTIG's active documents and user interfaces.

When you are creating a MUSTIG program, you may at any time slide the most interesting elements, e.g. input parameters or viewing modules, into one or several special windows called Images. These active windows allow to completely monitor your application from there, just like an actual virtual instrument.

Just pick up a MUSTIG Image module from the Library, open it and slide any module from your program into it : input parameters, graphical windows, active front panels, parts of MUSTIG programs, etc.

Arrange these elements to taste, add texts of various types and fonts : you get a custom graphical, user-friendly control interface in record time !

The elements in this document are not just copies of modules from your program, they are actual hyperlinks. Therefore, the created document is fully active : when you alter a parameter from there, all the elements that depend on it are automatically recalculated or reset.

You can actually monitor your whole application from one or several such custom interfaces. Thus, your colleagues may use your programs even if they are not familiar with the MUSTIG environment. You may produce Runtime versions of your programs.



Any other question ?


Something is not clear ? Or maybe you need some more information about MUSTIG ? Contacts



Back to main page