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

Home » Public Forums » archive » Re: Accessing an element of an array operation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Accessing an element of an array operation [message #2347] Tue, 07 June 1994 11:49
peter is currently offline  peter
Messages: 80
Registered: February 1994
Member
Mirko Vukovic (at913@cleveland.Freenet.Edu) wrote:

: a=convol(a,b)(5)?
: (the above produces an error message)

I believe that

a = (convol(a,b))(5)

should work.

Peter
Re: Accessing an element of an array operation [message #2349 is a reply to message #2347] Tue, 07 June 1994 11:31 Go to previous message
crdmi is currently offline  crdmi
Messages: 10
Registered: February 1994
Junior Member
In article <2t2ai3$87@usenet.INS.CWRU.Edu>, at913@cleveland.Freenet.Edu (Mirko Vukovic) writes:
> temp=convol(a,b)
> a=temp(5)
> Is it possible in IDL to shorten the above by directly accessing the sixth
> (in the above example) element of the convolution by doing something like:
> a=convol(a,b)(5)?

Yes. The proper syntax is:

a=(convol(a,b))(5)

The extra parens are apparently necessary to tell IDL what the (5) is
subscripting.

--
Daniel M. Israel "So you better hope there's intellegent
<crdmi@vulcan.giss.nasa.gov> life somewhere out in space, 'cause there's
Goddard Institute of Space Studies bugger all down here on Earth!"
2880 Broadway, New York, NY -Monty Python's "Universe Song"
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: "Help" in Widget Programs
Next Topic: Re: IDL opinions

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

Current Time: Fri Oct 10 20:47:39 PDT 2025

Total time taken to generate the page: 0.55962 seconds