Converting IDL code to MATLAB code automatically

idl2matlab under Windows, Mac or Linux automatically partially converts IDL code to MATLAB code.

apt install libbison-dev flex

git clone https://github.com/farhi/idl2matlab

cd idl2matlab

./configure --prefix=$HOME

now edit Makefile, being sure that

CFLAGS = -g -fno-stack-protector

then type

make && make install

The MATLAB code that idl2matlab produces uses a sort of cumbersome Matlab script that calls its own Matlab functions to do common tasks. The converted code can be further optimized. Still, probably easier than doing it all manually.

You’ll need to know basics of IDL, like what findgen and randomu mean in Matlab. Not plug and play, but not totally manual.

free GDL runs IDL code

Instead of IDL, try free open source GDL Gnu DataLanguage program

apt install gnudatalanguage

Python runs IDL code

PyIDL

from Python, simply import GDL see PYTHON.TXT