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

Home » Public Forums » archive » Re: REVERSE even row elements in data 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: REVERSE even row elements in data array. [message #12471 is a reply to message #12470] Mon, 03 August 1998 00:00 Go to previous messageGo to previous message
Kevin Ivory is currently offline  Kevin Ivory
Messages: 71
Registered: January 1997
Member
Jouhahn Lee wrote:
> Would you tell me how can I apply REVERSE only to the even row data in
> 64*32 array?

Henry Throop <throop@colorado.edu> already showed you an algorithm
I find confusing. I would do it like this:

data = indgen(64, 32) ; some test data
ydim = (size(data))[2] ; extract number of data rows
rev = indgen(ydim/2) * 2 ; generate the row indexing array
result = data ; only needed if you want to keep original array
result(*, rev) = reverse(data(*, rev), 2) ; reverse every second row

Voila,
Kevin
--
Kevin Ivory Tel: +49 5556 979 434
Max-Planck-Institut fuer Aeronomie Fax: +49 5556 979 240
Max-Planck-Str. 2 mailto:Kevin.Ivory@linmpi.mpg.de
D-37191 Katlenburg-Lindau, GERMANY http://www.gwdg.de/~kivory2/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL limits
Next Topic: Interrupting a widget application

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

Current Time: Sat Oct 11 12:45:12 PDT 2025

Total time taken to generate the page: 0.63694 seconds