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

Home » Public Forums » archive » 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 #29966 is a reply to message #29873] Tue, 26 March 2002 05:59 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
chi-kuei wrote:
>
> 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(*)

or better still:

IDL> test_array = REFORM( data_array(0, 0:47) )

With no other arguments, REFORM "strips out" all the degenerate dimensions.

paulv

--
Paul van Delst Religious and cultural
CIMSS @ NOAA/NCEP purity is a fundamentalist
Ph: (301)763-8000 x7274 fantasy
Fax:(301)763-8545 V.S.Naipaul
[Message index]
 
Read Message
Read Message
Previous Topic: REBIN Question
Next Topic: updating a different widget from the event handler

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

Current Time: Thu Oct 09 22:13:11 PDT 2025

Total time taken to generate the page: 0.88170 seconds