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

Home » Public Forums » archive » Adding elements in 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: Adding elements in an Array [message #85992 is a reply to message #85991] Mon, 23 September 2013 13:51 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mats Löfdahl writes:

> 11 and 13 are not the mean values of [10, 20, 5] and [6, 18, 17],
> respectively. 11 happens to be the mean of [1, 30, 2] but in general you
> need floating point calculations:
>
> IDL> print,rebin(float(a),3)
> 11.6667 13.6667 11.0000

Oh, I know that, but I was talking about something else entirely and
just using integer arrays to illustrate the point. :-)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Google Street Maps
Next Topic: idl: turn string value into variable name part2

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

Current Time: Fri Nov 28 09:52:28 PST 2025

Total time taken to generate the page: 0.00888 seconds