Re: vector of complex arrays [message #36669] |
Thu, 16 October 2003 16:25 |
condor
Messages: 35 Registered: January 2002
|
Member |
|
|
cabrera@fynu.ucl.ac.be (J Cabrera) wrote in message news:<4ab9e45.0310160836.2efee8e7@posting.google.com>...
> Hi,
>
> I need to create a vector of complex arrays. For example:
>
> If I want to store and to get 5 complex arrays like
>
> x = complexarr(10,10)
> scale_vector = replicate(x,5) ; it does not work but it is for explanation
>
> so I can get one of the arrays like
>
> x2 = scale_vector[2]
>
> Some idea?
I may be misunderstanding the question, but what would distinguish
such a thing from a 3D array? Something like
IDL> scale_vector = complexarr(10,10,5)
IDL> x2 = scale_vector[*,*,2]
IDL> help,x2
X2 COMPLEX = Array[10, 10]
|
|
|
Re: vector of complex arrays [message #36671 is a reply to message #36669] |
Thu, 16 October 2003 15:49  |
andrew.cool
Messages: 47 Registered: July 2003
|
Member |
|
|
cabrera@fynu.ucl.ac.be (J Cabrera) wrote in message news:<4ab9e45.0310160836.2efee8e7@posting.google.com>...
> Hi,
>
> I need to create a vector of complex arrays. For example:
>
> If I want to store and to get 5 complex arrays like
>
> x = complexarr(10,10)
> scale_vector = replicate(x,5) ; it does not work but it is for explanation
>
> so I can get one of the arrays like
>
> x2 = scale_vector[2]
>
> Some idea?
>
> Thanks
>
> Juan
Juan,
What about x = complexarr(10,10,5) ?
or an array of structures? :-
st_def = {ca:complexarr(10,10)}
scale_vector = Replicate(st_def,5)
Andrew
|
|
|
Re: vector of complex arrays [message #36672 is a reply to message #36671] |
Thu, 16 October 2003 15:23  |
Pavel Romashkin
Messages: 166 Registered: April 1999
|
Senior Member |
|
|
How about
x = complexarr(5,10,10)
x2 = scale_vector[2,*,*]
Pavel
J Cabrera wrote:
>
> Hi,
>
> I need to create a vector of complex arrays. For example:
>
> If I want to store and to get 5 complex arrays like
>
> x = complexarr(10,10)
> scale_vector = replicate(x,5) ; it does not work but it is for explanation
>
> so I can get one of the arrays like
>
> x2 = scale_vector[2]
>
> Some idea?
>
> Thanks
>
> Juan
|
|
|