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

Home » Public Forums » archive » Re: behavior of arrays
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: behavior of arrays [message #15430] Wed, 19 May 1999 00:00 Go to previous message
Pavel Romashkin is currently offline  Pavel Romashkin
Messages: 166
Registered: April 1999
Senior Member
I do not quite realize what is the point in this exercise. FLTARR(10,1)
is an array with 10 columns and 1 row (which all is meaningful only in
the direction of array operations which in IDL is row-wise). Therefore,
seems to me that FLTARR(10, 1) is the same as FLTARR(10) to begin with
(unlike FLTARR(1, 10)). If you anticipate expanding the matrix, its easy
to do by using TRANSPOSE and subscripts. I have never experienced a
problem with losing or mixing up dimensions, although most of my data
are matrices. In the example below, I see no loss of information in the
transition from d to c. If you defined more than 1 row, C would be 2D
in the last statement.
Cheers,
Pavel

"R.Bauer" wrote:

> I have some problems to understand the logic which may be behind the
> handling of an array
> like defined.
>
> Why is the result help, b.d only [10] and not [10,1] ?
>
> This means I will lose the information that's it is / was a 2-dim
> dataset.
>
> R.Bauer
>
> d=reform(findgen(10),10,1)
> help,d
> ;D FLOAT = Array[10, 1]
>
> b=create_struct('d',d)
> help,b,/str
>
> ;** Structure <1348428>, 1 tags, length=40, refs=1:
> ; D FLOAT Array[10, 1]
>
> help,b.d
> ; <Expression> FLOAT = Array[10]
>
> c=b.d
> help,c
> ; C FLOAT = Array[10]
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Variable stride in array indices and other enhancements
Next Topic: Re: IDL Book Half Price!? (Frivolous Post)

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

Current Time: Fri Oct 10 10:24:38 PDT 2025

Total time taken to generate the page: 0.80512 seconds