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 #85984 is a reply to message #85983] Mon, 23 September 2013 11:30 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Monday, September 23, 2013 1:46:09 PM UTC-4, nata wrote:
> y = x[1:*:3]

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)

--Wayne
[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: Sat Nov 29 01:59:24 PST 2025

Total time taken to generate the page: 0.88268 seconds