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 #85985 is a reply to message #85984] Mon, 23 September 2013 12:37 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wlandsman writes:

> That takes every 3rd element starting with element 1. It gives the right answer in this case but just by coincidence, e.g. element 1 just happens to be the mean of the first 3 values, and element 4 happens to be the average of the second 3 values.
>
> My solution would be
>
> IDL> y = rebin(x,3)

It's not clear to me that nearest neighbor sampling is the same as the
"mean" value in general, although it works in this specific case.

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: Sun Oct 12 06:01:21 PDT 2025

Total time taken to generate the page: 0.96379 seconds