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

Home » Public Forums » archive » User selectable lower array bound?
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: User selectable lower array bound? [message #26119 is a reply to message #25981] Fri, 03 August 2001 03:40 Go to previous messageGo to previous message
Marcus O'Brien is currently offline  Marcus O'Brien
Messages: 16
Registered: October 2000
Junior Member
Yep,

This is something I wanted to use for converting images to center of mass coordinates for
principle axes transformations, ended up faffing around to simulate it. The concept does
appear in display coordinate systems for objects though (well it seems vaguely related to
me).

Marc

Paul van Delst wrote:

> Hey there,
>
> Is is just me, or would anyone else find useful the ability to define arrays in IDL such
> that the lower bound is *not* always zero? Sorta like:
>
> x = FINDGEN( 11, LOWER = -5 )
> or
> y = DBLARR( 100, LOWER = 1 )
>
> so that accessing elements such as x[ -4 ] or y[ 100 ] are o.k.?
>
> I know this can be done now with judicious use of proxy indices, e.g.
>
> FOR i = -5, 5 DO BEGIN
> ix = i + 5
> PRINT, x[ ix ]
> ....do other stuff with negative i's....
> ENDFOR
>
> but sometimes this makes code hard to follow (or explain to someone who's never used the
> code before) in direct correspondence with a physical process.
>
> It seems like such a simple thing to be able to do (with default action being start at
> index 0) although I'm sure the amount of work required to implement this would be
> horrendous. Still, it shur would be nice.....
>
> paulv
>
> --
> Paul van Delst A little learning is a dangerous thing;
> CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
> Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
> Fax:(301)763-8545 And drinking largely sobers us again.
> Alexander Pope.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL virtual reality (was 3D Object IDL )
Next Topic: problem getting values from cw_bgroup normal base

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

Current Time: Wed Oct 08 19:02:57 PDT 2025

Total time taken to generate the page: 0.00379 seconds