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

Home » Public Forums » archive » array handling
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: array handling [message #74241 is a reply to message #52128] Wed, 05 January 2011 07:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MC writes:

> Err, isn't that's going to average the data without the /sample
> keyword?

I think if it averaged the data there would be a
decimal point and a .5 in the answer. ;-)

REBIN always does a /SAMPLE when making the
array smaller, by default.

> As an alternative, how about about using reform:
>
> IDL> array = indgen(10)
> IDL> evenodd=reform(array,2,5)
> IDL> print,"even:" & print,evenodd(0,*)
> IDL> print,"odd:" & print,evenodd(1,*)
>
> As one line:
> print,(reform(array,2,5))(1,*)

There are LOTS of alternatives. This was just
the simplest solution that came to mind. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("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
Previous Topic: Re: stl files
Next Topic: IDL output directed to STDERR-- can't seem to work around...

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

Current Time: Sat Oct 11 02:33:15 PDT 2025

Total time taken to generate the page: 1.68060 seconds