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

Home » Public Forums » archive » Trailing array dimensions
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: Trailing array dimensions [message #91340 is a reply to message #91339] Wed, 01 July 2015 04:58 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Wednesday, July 1, 2015 at 1:12:09 PM UTC+2, rj...@le.ac.uk wrote:
> On Wednesday, July 1, 2015 at 10:21:07 AM UTC+1, rj...@le.ac.uk wrote:
>> Can someone explain where I'm going wrong with this please?
>
>
> I've got the problem reduced to the fact that I don't know how to test an array to see if it has a trailing dimension.
>
> SIZE reports it only has 1 dimension and ignores the trailing dimension.

Hi,
how about using reform?

IDL> my_variable=indgen(10,1)
IDL> if size(my_variable,/n_dimensions) eq 1 then data = {my_variable:reform(my_variable,10,1)} else data = {my_variable:my_variable}
IDL> help, data
** Structure <18c8f8d0>, 1 tags, length=20, data length=20, refs=1:
MY_VARIABLE INT Array[10, 1]

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: i need to use this idl function. but how ?
Next Topic: Filtering out noise quickly?

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

Current Time: Wed Oct 08 11:43:12 PDT 2025

Total time taken to generate the page: 0.00413 seconds