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

Home » Public Forums » archive » conbining 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: conbining arrays [message #93339 is a reply to message #93338] Fri, 17 June 2016 02:06 Go to previous messageGo to previous message
Markus Schmassmann is currently offline  Markus Schmassmann
Messages: 129
Registered: April 2016
Senior Member
On 06/17/2016 12:23 AM, Sharad wrote:> On Wednesday, June 15, 2016 at
10:22:02 AM UTC-4, Sharad wrote:
>> How to combine following arrays in a single file?
>>
>> A FLOAT = Array[195]
>> B FLOAT = Array[1440, 195]
>> C FLOAT = Array[195]
>> D LONG = Array[1440]
> it will be [1442,196]

if i understand correctly what you want, i see 2 possibilities:

outarr=[[[reform(A,[1,195]),B,reform(C,[1,195])]],[0,D,0]]

or using Wayne's approach

outarr = fltarr(1442,196)
outarr[0 ,0:194]=reform(A,[1,195])
outarr[1:1440,0:194]=B
outarr[1441 ,0:194]=reform(C,[1,195])
outarr[1:1440,195 ]=D

You could also use transpose instead of reform, but reform should be
faster. However reform only gives the same result as transpose if A and
C are vectors, i.e. if 2 dimensions have size >1 you have to use transpose.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help needed in using object graphics
Next Topic: Reading DICOM problem

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

Current Time: Wed Oct 08 11:33:28 PDT 2025

Total time taken to generate the page: 0.00372 seconds