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

Home » Public Forums » archive » Re: Split an int array into different arrays
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: Split an int array into different arrays [message #83398] Mon, 04 March 2013 06:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Krishnakumar M.A writes:

> Thanks for the sudden reply. I tried that but what it is not "splitting" the dataset into different arrays, instead giving the same data set in each new array, which is not I wanted. I made some confusion in the question, i think. What i require is to split a large array, say array(1000) to arrays(100), in which i will be getting first 100 points in the first column then the next 100 in the 2nd column and so on. but that is not happening with the reform command?
> Did I do anything wrong?

Probably you just forgot to mention "columns". We all think "rows"
around here. Try this:

array = Indgen(100)
foldedArray = Transpose(Reform(array, 10, 10))

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Split an int array into different arrays
Next Topic: bug? or how to distinguish between a Hash and an array of Hashes ?

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

Current Time: Wed Oct 08 19:31:12 PDT 2025

Total time taken to generate the page: 0.00444 seconds