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

Home » Public Forums » archive » Duplicating an array help
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: Duplicating an array help [message #90839 is a reply to message #90837] Fri, 24 April 2015 16:30 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Friday, April 24, 2015 at 7:20:51 PM UTC-4, don.wo...@gmail.com wrote:
> On Friday, April 24, 2015 at 5:02:42 PM UTC-6, Joe Llama wrote:

> This would probably work. It's not very readable, but it's only one line. Your code produces a 510 element array, so I used rebin with 102 as the second dimension then flattend it. I don't know how memory efficient this is.
>
> z=(rebin(x,5,102))[*]

Perhaps slightly more readable (or perhaps not) is

z = reform(rebin(x,5,102),510)

It is worth mentioning here one of the classics of the IDL literature, JD Smith's "Dimension Juggling Tutorial":

http://www.idlcoyote.com/tips/rebin_magic.html
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how did I get here?
Next Topic: Can the underlying algorithm used in CONTOUR be accessed somehow?

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

Current Time: Wed Oct 08 13:37:16 PDT 2025

Total time taken to generate the page: 0.00407 seconds