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

Home » Public Forums » archive » Re: Speedy way to get compare array elements. . .
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: Speedy way to get compare array elements. . . [message #33031 is a reply to message #32835] Thu, 28 November 2002 06:58 Go to previous messageGo to previous message
the_cacc is currently offline  the_cacc
Messages: 104
Registered: October 2001
Senior Member
Craig Markwardt <craigmnet@cow.physics.wisc.edu> wrote in message news:<on4raklqpk.fsf@cow.physics.wisc.edu>...
> ...The cool thing about the trick is that IDL *automatically* truncates
> the vector A so that it matches the length of A[1:*].
>

Ah, but is there any way to not make it do that? Say you have 2
vectors of different lengths:

x = findgen(50)
y = findgen(100)

and you want to form z = x * y, but have z the same length as y
putting zeros where x has no value. The (sorry) way I am doing it is

z = y * 0
z[0:49] = x * y

which clearly is too much programmer work since I have to get the
lengths... Any ideas?

Ciao.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: georeferencing satellite data
Next Topic: Running FlexLM on OS X

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

Current Time: Wed Oct 08 18:38:30 PDT 2025

Total time taken to generate the page: 0.00464 seconds