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

Home » Public Forums » archive » the dimension of array
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
the dimension of array [message #27303] Tue, 16 October 2001 20:09 Go to next message
web is currently offline  web
Messages: 24
Registered: March 2001
Junior Member
Hi, I ofter use the following operation:
a=fltarr(10,10,10) is a 3-d array,
if I set
b=a(0,*,*), it is still a 3-d array. But I hope b is a 2-d
array. How can I do then?

best,
jiali
Re: the dimension of array [message #28054 is a reply to message #27303] Thu, 15 November 2001 13:41 Go to previous message
hradilv.nospam is currently offline  hradilv.nospam
Messages: 19
Registered: November 2001
Junior Member
Or you can declare b ahead of time:

b = fltarr(10,10)
b[*,*] = a[0,*,*]

On Thu, 15 Nov 2001 22:06:18 +0100, Alexander Rauscher
<e9121161@stud4.tuwien.ac.at> wrote:

>
>
> On Wed, 17 Oct 2001, jiali wrote:
>
>> Hi, I ofter use the following operation:
>> a=fltarr(10,10,10) is a 3-d array,
>> if I set
>> b=a(0,*,*), it is still a 3-d array. But I hope b is a 2-d
>> array. How can I do then?
>>
>> best,
>> jiali
>
> c=reform(b,10,10)
>
>
Re: the dimension of array [message #28055 is a reply to message #27303] Thu, 15 November 2001 13:06 Go to previous message
Alexander Rauscher is currently offline  Alexander Rauscher
Messages: 9
Registered: August 2001
Junior Member
On Wed, 17 Oct 2001, jiali wrote:

> Hi, I ofter use the following operation:
> a=fltarr(10,10,10) is a 3-d array,
> if I set
> b=a(0,*,*), it is still a 3-d array. But I hope b is a 2-d
> array. How can I do then?
>
> best,
> jiali

c=reform(b,10,10)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: HASP/ flexLM licensing conflict
Next Topic: array chicanery

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

Current Time: Wed Oct 08 14:52:31 PDT 2025

Total time taken to generate the page: 0.00587 seconds