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

Home » Public Forums » archive » Sum to 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: Sum to Arrays [message #4342 is a reply to message #4243] Fri, 19 May 1995 00:00 Go to previous message
mole is currently offline  mole
Messages: 5
Registered: April 1995
Junior Member
Fergus Gallagher (F.Gallagher@nerc.ac.uk) wrote:
: phrje@csv.warwick.ac.uk (Prof. Don McK Paul) wrote:
: >We wish to e.g. sum the columns of a 2d array and store the results in a
: >1d array. Is there any way to accomplish this without using FOR loops.
: >
: >Don

: The total function has an optional second argument, the dimension to sum
: over, e.g.,

: IDL> x = total(y,2)

OK.... here's a tougher one to vectorize...


I want CENTROIDS, FAST!!! I'm stuck with :

x = fltarr(m)
for i=0,n do x = TOTAL(y(*,i) * findgen(n+1))

any ideas???

--
Aaron Birenboim | 1007 Pampas Dr. SE |
mole@netcom.com | Albuquerque, NM 87108 |
(505) 254-1749 | |
(505) 247-8371 (w) or birenboi@ataway.aptec.com |
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: object searching in an image
Next Topic: complex math error?

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

Current Time: Sat Oct 11 02:10:20 PDT 2025

Total time taken to generate the page: 5.67854 seconds