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

Home » Public Forums » archive » Re: Reducing an array.
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: Reducing an array. [message #32274 is a reply to message #32271] Mon, 30 September 2002 23:15 Go to previous messageGo to previous message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
In order to perform an OR on 64 bits stored in an array, could you do
something like this:

a = [0,0,0,1,0,1,0,1,1]
b = total(a) GT 0

Then, if any of the elements of a are non-zero, b will be TRUE, or 1.
At least I hope that's what you meant by OR.

Likewise AND would be

c = total(a) EQ n_elements(a)

M. Katz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: mpeg and powerpoint
Next Topic: Re: Looking for more ideas on code ...

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

Current Time: Sun Nov 30 21:09:04 PST 2025

Total time taken to generate the page: 0.40251 seconds