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

Home » Public Forums » archive » Swap even/odd elements in 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: Swap even/odd elements in array [message #44580 is a reply to message #44507] Wed, 22 June 2005 14:43 Go to previous messageGo to previous message
Peter Mason is currently offline  Peter Mason
Messages: 145
Registered: June 1996
Senior Member
photosalex@freenetname.co.uk wrote:
> Hi All,
> sorry if the question is trivial:
> how could I swap even and odd elements of a 1-D 16-bit INT array
> without using loops?

One from the south-east:
j=indgen(16)
print,fix(swap_endian(long(swap_endian(j),0,8),0,16)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Histogram shift
Next Topic: background transparency in tvscl?

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

Current Time: Thu Oct 09 23:04:55 PDT 2025

Total time taken to generate the page: 0.63901 seconds