Here are some simple syntactical comparisons between IDL and MATLAB. (Please note that I am not a real MATLAB user!) An obvious difference is that IDL does not need a ';' or other character to terminate a statement as the end of line is considered to be a terminator unless '&' is used to explicitly denote a continuation line. Both languages are array/matrix oriented but the array syntax in IDL is closer to Fortran.
IDL MATLAB comments
print,...,format='...' fprintf(....) NB: format statement is not
compulsory in IDL
& ; multiple statements
$ no ; continuation
; ! in-line comments
* : ranges in arrays
Back to lab1 home page