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

Home » Public Forums » archive » Re: Array manipulation (typo fixed)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Array manipulation (typo fixed) [message #22315] Wed, 01 November 2000 10:07
R.G.S. is currently offline  R.G.S.
Messages: 46
Registered: September 2000
Member
That should be:


; create a test case here
a = indgen(12,15)
ncols = (size(a))(1)


; Assumes square pieces
piecesize = 3 ; size of the square subarray (i.e. piecesize by piecesize)
srow = 1 ; which row of the possible subsets
scol = 2 ; which column of the possible subsets

indices = indgen(piecesize,piecesize) +(intarr(piecesize) + 1) #
indgen(piecesize) * (ncols - piecesize) +piecesize*srow*ncols +
scol*piecesize
subarray = a(indices)
help,subarray
print,subarray
end



(I had a "b" instead of "subarray" in two fo the lines,
because I am a moron.)

Cheers,
bob stockwell
stockwel (at) co-ra.com
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: library of satellite processing functions?
Next Topic: trapping type conversion errors

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

Current Time: Wed Oct 08 16:52:00 PDT 2025

Total time taken to generate the page: 0.00501 seconds