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

Home » Public Forums » archive » Re: Comparing 2 arrays
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: Comparing 2 arrays [message #55562 is a reply to message #55561] Sat, 25 August 2007 21:47 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> If your arrays are the same size, there is no problem using structures.
> You could subtract the two values and call the result "equal" if
> the difference was "sufficiently" close to zero.
>
> IF Total( (data1.A - data2.B) LT 1e-6) EQ N_Elements(data1.A) THEN $
> Print, 'The arrays are equal' ELSE Print, 'The arrays are unequal'

Well, you probably need to check whether the absolute
value of the difference (ABS) is sufficiently close to
zero. But other than that, I think this should work.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is there somebody familiar with nurbs or b-Spline?
Next Topic: File Output in IDL

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

Current Time: Thu Oct 09 21:16:31 PDT 2025

Total time taken to generate the page: 0.64017 seconds