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

Home » Public Forums » archive » Re: Problems with scalar structures
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: Problems with scalar structures [message #11799] Tue, 26 May 1998 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
Brian Jackel <jackel@danlon.physics.uwo.ca> writes:
>
> Can anyone suggest a (simple, elegant) way to deal with
> the generic command
>
> test.x= test.x * a
>
> where "test.x" and "a" are arrays of length N, and N is
> sometimes equal to 1?

I use the following, and it seems to work fine:

test(*).x = test(*).x * a

It works under both IDL 4 and 5. By the way, I think even "scalar"
structures are actually vectors of length one, so this notation should
always work.

Craig


--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@astrog.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Previous Topic: Q: DEFROI for object-graphics?
Next Topic: Re: vector overplot

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

Current Time: Wed Oct 08 19:35:35 PDT 2025

Total time taken to generate the page: 0.00441 seconds