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

Home » Public Forums » archive » Re: Compare two variables
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: Compare two variables [message #61276] Mon, 14 July 2008 06:00 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On 14 Jul., 04:57, "ben.bighair" <ben.bigh...@gmail.com> wrote:
> On Jul 14, 4:09 am, Joost Aan de Brugh <joost...@gmail.com> wrote:
>
>
>
>
>
>> Hello Dave,
>
>>> hi Joost
>>> but i work with float data. as you said this metheod works for
>>> integer. could we modify it to work for non integer data?
>>> Cheers
>>> Dave
>
>> That is a pity. But isn't that dangerous in any case. If A and B are
>> floats then the expression A eq B is not reliable because of
>> continuous rounding. It may still be reliable if absolutely no
>> arithmetic is involved.
>
>> The compression trick does not work for floats, because of the degree
>> of infinity.
>
>> Maybe a two-step filtering is apropriate
>
>> idx1 = Where(B[2,*] = A[0,j]) ; in for-loop or with the matrix-trick I
>> did with DA and DB.
>> inbetweenresult = B[*,idx1]
>
>> idx2 = Where(inbetweenresult[3,*] = A[1,j]) ; in for-loop or with the
>> matrix-trick I did with DA and DB.
>> result = inbetweenresult[*,idx2]
>
> Hi,
>
> It doesn't seem to me that Dave has provided sufficient information.
> I think the question was not fully fleshed out so it is hard to
> provide helpful answers.
>
> For example, is it possible that the coordinates could be temporarily
> coerced into integers with losing unique pairings?  If that is that
> case then he can use the method described by Joost.    Or, here is
> another tack, is there a certain granularity (or precision) to the
> coordinates - measured to the nearest tenth or hundreth perhaps?  If
> that is the case then he could simply promote the coordinates by
> multiplying by 10 (or 100 or whatever) and then convert to integer.
>
> Cheers,
> Ben- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Ben
Actually my coordinates are float numbers with 2 decimal. I think your
proposed way is good and I can multiply that numbers whit 100 to take
integers and after finishing I can divide them to 100 to take actual
coordinate.
Cheers
Dave
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: number problem
Next Topic: EARN MONEY $2500-10000 PER WEEK

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

Current Time: Thu Oct 09 13:17:38 PDT 2025

Total time taken to generate the page: 0.79907 seconds