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

Home » Public Forums » archive » idl versus matlab
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: idl versus matlab [message #37109 is a reply to message #37053] Fri, 21 November 2003 10:17 Go to previous message
George N. White III is currently offline  George N. White III
Messages: 56
Registered: September 2000
Member
On Thu, 20 Nov 2003, Gareth Mottram - RSG wrote:

> I have to admit this is a slightly frivolous post, but here goes.
> A guy in my office insists that matlab is better for multivariate stats
> in image analysis than IDL, I doubt whether this is correct but I don't
> have any examples to prove him wrong, or indeed to prove me wrong.
>
> Anyone out there have opinions/comments/examples?

Matlab pales in comparison to J and APL for elegance.

The S language (e.g., R) is nice for stats. One factor that makes S so
nice to use is the well-designed support for missing data. In addition to
the usual IEEE NaN and Inf values, there is 'NA':

> x<-c(0:4,NA) ; 1/x
[1] Inf 1.0000000 0.5000000 0.3333333 0.2500000 NA
> c(mean (1/x), mean (1/x,na.rm=T))
[1] NA Inf
> x[1]<-NA ; c(mean (1/x), mean (1/x,na.rm=T))
[1] NA 0.5208333

'NA' is implemented using distinguished values. Every operation has to
test for these values. That is a lot of overhead if you don't need it. It
is, however, a huge time-saver if the alternative requires you to type
'where(...)' dozens of times (especially if you are like me and have to
think a few minutes to remember whether you are supposed to use 'A lt B'
or 'A .lt. B' or 'A < B'). Some people try to use NaN/Inf for this, but
the overhead for NaN/Inf processing is typically much higher, and you can
miss problems like logs of negatives in your code.

--
George N. White III <aa056@chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia, Canada
[Message index]
 
Read Message
Read Message
Previous Topic: Truetype fonts
Next Topic: modifying itools (ivolume)

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

Current Time: Wed Oct 22 14:55:42 PDT 2025

Total time taken to generate the page: 1.83952 seconds