Man page of idl2matlab
Section: USER COMMANDS (1)
Updated: 1.5 (21 January 2009)
Return to Main Contents
idl2matlab - This tool translates automatically an IDL code into Matlab/Scilab code.
[-options] inputFile [outputDirectory]
command is an automatic translation tool from the IDL (and partly PV-Wave) to Matlab and Scilab source code.
idl(1) [http://www.ittvis.com] and matlab(1) [http://www.mathworks.com] are two major numerical languages for scientists. Additionally, scilab(1) [http://www.scilab.org] 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 have developped an automatic translator from IDL to Matlab and Scilab.
This translator works as follow:
* analyze and formalize the IDL grammar
* use lex/yacc to parse the original IDL source code to translate
* generate a translated equivalent program, using Matlab grammar (and all variable types)
* 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.
IDL2Matlab works on all systems (Unix/Linux/Windows). It is built upon lex/yacc and programmed in C.
The usage of the translator is done through the command line.
Installation of the package is done with the usual procedure: ./configure; make; make install on Linux/Unix systems. An installation script is provided for Windows systems.
for script files translation
- -S string
for string translation
to hide messages
to stop warnings writing
to print the abstract tree
to get idl2matlab version
to get x spaces for a tabulation x<10
to translate only one function
to translate for scilab(1) (default : matlab(1))
idl2matlab -qw essai.pro outDir/
idl2matlab -t essai.pro outDir/ > out
idl2matlab -S "print,'IDL2Matlab'"
idl2matlab -T4 essai.pro outDir/ > out
idl2matlab -f essai.pro functionName outDir/ > out
environment variable may be set to define the IDL2Matlab library location. This is /usr/local/lib/idl2matlab on Linux/BSD systems, and C:idl2matlab on Windows systems. Executables are usually located in /usr/local/bin on Linux/BSD systems, and in C:idl2matlabndows systems.
idl2matlab is an experimental tool. The IDL grammar handled by idl2matlab is not fully qualified, and you should expect small translation errors. Additionally, the Library is certainly unstable and incomplete. PV-Wave translation should work partially.
Graphic functions (plot, surf, widgets) are incomplete. Translated code is not guaranteed to work. IDL objects are not translated.
idl2matlab returns 1 in case of error, 0 when all went fine
project leaders: Emmanuel FARHI and Didier RICHARD.
team1: AZIZI MOURIER Karim, BENZEGHIOUA ABDESLAM, GARDON Lucien, SYLVESTRE Nadege.
team2: BOURTEMBOURG Reynald, CORTINA Stephane, SZCZUCZAK Nadege.
Designed by the Computing for Science group
Institut Laue Langevin, BP 156
F-38042 Grenoble cedex 9, FRANCE
Institut Laue Langevin at [http://www.ill.eu/]
IDL at [http://www.ittvis.com/]
Matlab at [http://www.mathworks.com/]
Scilab at [http://www.scilab.org]
matlab(1), idl(1), scilab(1), octave(1)
- EXIT STATUS
- SEE ALSO
This document was created by
using the manual pages.
Time: 10:29:26 GMT, January 21, 2009