|
Re: Referencing various variables through string( )? [message #47799 is a reply to message #47797] |
Tue, 07 March 2006 09:18  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
David Fanning wrote:
> Daelomin writes:
>
>
>> The reason why I didnt store values in a bigger array
>> (tcwv=fltarr(7,NPoints) for example) is that when I assign a column to
>> a variable, I always get a variable of size (1,Npoints) instead of
>> Npoints... There must be a function to drop the "useless" reference to
>> a 1D array in 2 variables, I just dont know it...
>
>
> col = Reform(tcwv[4,*])
Alternatively you can construct your monster array like so:
tcwv=fltarr(NPoints,7)
and let IDL do the (usually) superflous dimension removal for you (much to the
consternation of some c.l.i-p readers I believe).
paulv
--
Paul van Delst
CIMSS @ NOAA/NCEP/EMC
|
|
|
Re: Referencing various variables through string( )? [message #47801 is a reply to message #47799] |
Tue, 07 March 2006 09:01  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Daelomin writes:
> The reason why I didnt store values in a bigger array
> (tcwv=fltarr(7,NPoints) for example) is that when I assign a column to
> a variable, I always get a variable of size (1,Npoints) instead of
> Npoints... There must be a function to drop the "useless" reference to
> a 1D array in 2 variables, I just dont know it...
col = Reform(tcwv[4,*])
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|