Re: IDL2MATLAB [message #29471 is a reply to message #19024] |
Tue, 26 February 2002 12:04   |
Liam E. Gumley
Messages: 378 Registered: January 2000
|
Senior Member |
|
|
Ethan wrote:
>
> notspecified@dev.null (Matt Feinstein) wrote in message news:<3c7b8f32.5448103@aplnews>...
>> On 26 Feb 2002 05:02:19 -0800, the_cacc@hotmail.com (trouble) wrote:
>>
>> translation would be pretty trivial (except, I guess, for
>> vectorization).
>
> actually, matlab has a fairly similar vector processing
> implementation, I wouldn't be surprised if the vector/array ops are
> trivial it would just be hard to interpret every single IDL function
> call into the comparable matlab function call. some of these would
> be trivial, some of them would be very difficult. I would imagine a
> translator that will convert ~90% of IDL code to matlab code would be
> trivial, ~9% would be hard, and maybe 1% would be next to impossible.
A complicating factor is that in IDL, arrays are stored in column-major
order (the same as FORTRAN), while in Matlab, arrays are stored in
row-major order (the same as C). And let's not forget that just about
all compuations in Matlab are performed in double precision by default.
IMHO the only workable way to translate IDL to Matlab is to hire someone
who is fluent in both languages, and have them rewrite the code.
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|