comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Matlab to IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Matlab to IDL [message #49273 is a reply to message #36627] Mon, 10 July 2006 10:03 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
KRDean@gmail.com wrote:
> One of my colleagues dumped some Matlab code on my desk and gave me a
> choice, learn MatLab or rewrite it in IDL.

If the dumped code came with an accompanying matlab license, I would vote for learning
Matlab.... and along the way of that, rewriting the code in IDL. Having another tool in
the toolbox can only help with writing code in IDL.
>
> Of course, my first choice would be to rewrite it in IDL.
>
> Most of the code is straight forward, but how would I write this
> MatLab statement in IDL?
>
> # -- MatLab Code
> # -- ASSUMES THE YEAR IS THE SAME
>
> months_differ = month_beg ~= month_end

~= is the "not equal to" relational operator (NE in IDL).

In IDL:

month_differ=(month_beg NE month_end)

and used thusly:

IDL> month_beg=2
IDL> month_end=12
IDL> month_differ=month_beg NE month_end
IDL> if ( month_differ ) then print, 'they are different'
they are different
IDL>

paulv


--
Paul van Delst Ride lots.
CIMSS @ NOAA/NCEP/EMC Eddy Merckx
Ph: (301)763-8000 x7748
Fax:(301)763-8545
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDLWAVE Mac OS X
Next Topic: Tutorial: Using idl in java applications

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:06:44 PDT 2025

Total time taken to generate the page: 0.56148 seconds