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

Home » Public Forums » archive » Sum of elements in an array
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Sum of elements in an array [message #2327] Thu, 09 June 1994 04:10
ragnar is currently offline  ragnar
Messages: 2
Registered: June 1994
Junior Member
I'm working on a project where I need to sum the result of many IF-statements.
In order to make this operation faster, I want to vectorize it. The way I
want it is :

sum=(array_1.element EQ 1)

with sum a scalar, and array_1 an array. (BIG surprise!)
In other words : If array_1.element equals 1, then add 1 to sum.
How do I go about to solve this?

Thanx in advance.

Ragnar Aas
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: SPACE-MOUSE with IDL ?
Next Topic: SPACE-MOUSE = 3D-MOUSE

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

Current Time: Fri Oct 10 10:14:02 PDT 2025

Total time taken to generate the page: 1.35807 seconds