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

Home » Public Forums » archive » Re: 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 #4235] Thu, 11 May 1995 00:00 Go to previous message
Fergus Gallagher is currently offline  Fergus Gallagher
Messages: 41
Registered: January 1995
Member
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)

sums over the second dimension of y and returns a vector equal in length
to the first dimension of y.

Fergus


=================================================
| Fergus Gallagher |
| Remote Sensing Applications Development Unit |
| British National Space Centre |
| Monks Wood |
| Huntingdon PE17 2LS / UK |
| |
| F.Gallagher@nerc.ac.uk |
| http://uh.nmt.ac.uk/bnsc/fgg.html |
=================================================
[Message index]
 
Read Message
Read Message
Previous Topic: Re: importing Macintosh AIFF
Next Topic: importing Macintosh AIFF

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

Current Time: Sat Oct 11 01:07:05 PDT 2025

Total time taken to generate the page: 0.48137 seconds