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

Home » Public Forums » archive » Re: Want to get Array(48) instead of Array(1,48)
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: Want to get Array(48) instead of Array(1,48) [message #29871] Mon, 25 March 2002 23:38 Go to previous message
Dominik[1] is currently offline  Dominik[1]
Messages: 46
Registered: April 2001
Member
I know the problem and the only solution I found till yet is, that I change
the order of the dimensions from [1,48] to [48,1] and then IDL will "loose"
the last dimension, changing it into [48]. This can be done wich test_array=
transpose(test_array, [1,0]).

Dom

"chi-kuei" <twcollie@hotmail.com> schrieb im Newsbeitrag
news:a7om25$8jn$1@news01.cit.cornell.edu...
> Hi,
>
> It occurs to me that when I do the following:
>
> IDL> test_array = fltarr(48)
> test_array is Array[48]
>
> but when I assign the value from a 2-D array
> IDL> test_array = data_array(0, 0:47)
> test_array becomes Array[1,48]
>
> I notice they are different because when I use curvefit, the Array[1,48]
> will give me error message, the Array[48] will not.
>
> I can make the Array[1,48] become Array[48] without changing the value by
> doing this:
> IDL> test_array = test_array(*)
>
> This means extra steps. Am I doing this in the longer way? Is there any
> shortcut of doing this.
>
> Thanks,
> Chi-Kuei
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: FIND the indexes of a value in a matrix
Next Topic: Transparent texture mapped polygons

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

Current Time: Fri Oct 10 09:41:07 PDT 2025

Total time taken to generate the page: 0.96085 seconds