Close This Window

Please download official ILL logos here


For using on the web or on a screenFor printing in high resolutionWhite version, for dark backgrounds

Download PNG

Download AI

Download white PNG

Download JPG


Download white AI


The Computing for Science (CS) group supports ILL scientists, students and visitors in a number of activities including data analysis, instrument simulation and sample simulation.

Back to ILL Homepage
English French Deutsch 

All Software

IDL to Matlab/Scilab translator (IDL2Matlab)

Version 1.6 (2013-05-01)

Purpose: Automatic translation from an IDL program into Matlab and Scilab code


IDL <> and Matlab <> are two major numerical languages for scientists. Additionally, Scilab <> is a free Matlab-like software, which integrates a high compatibility (syntax, functions, graphics, user interfaces).
Many IDL programs have been developed in large facilities studying astrophysics, geology,medicine, particle and nuclear physics.
On the other hand, Matlab is widely used in smaller laboratories (universities, national scientific agencies, ...). In order to extend the portability of such IDL programs, we are developing an automatic translator from IDL to Matlab and Scilab.


This translator works as follow:

1. analyze and formalize the IDL grammar
2. use lex/yacc to parse the original IDL source code to translate
3. generate a translated equivalent program, using Matlab grammar (and all variable types)
4. use a hash table for library functions.
This library is quite big, and covers the most useful IDL/Matlab functions, particularly mathematical functions, basic plotting functions, widgets/uicontrols


This project is hosted at Download it at <>. The code is available as well as a Linux/Debian package here for e.g. Ubuntu/Mint. A web service is also available at <>.

IDL2Matlab works on all systems (Unix/Linux/Windows). It is built upon lex/yacc and programmed in C. Compilation of the translator does not require lex/yacc.
The usage of the translator is done through the command line. Installation is done through the usual './configure; make; make install' procedure on Unix/Linux systems. On Windows systems, create an 'idl2matlab' directory


GCC >= 4 installs a stack protector which leads to a buffer overflow error. Add the '-fno-stack-protector' and remove the optimization '-O2' to the CFLAGS variable in the Makefile.

Current status of the project:
The project was started October 2001. It became operational on Autumn 2002.
The translator works already very well. For instance the whole LAMP  program from ILL could be translated.
Limitations: object translation, and most complex plotting routines are not supported.

Coordinators: Didier Richardrichard(at) and Emmanuel Farhi
Team 2: BOURTEMBOURG Reynald, CORTINA Stephane, SZCZUCZAK Nadege

The translation also performs an IDL syntax check, and reports possible warnings and errors into a Log.




IDL 2 Matlab documents (in French)