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

Home » Public Forums » archive » Re: How to do a "match merge"?
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: How to do a "match merge"? [message #27594 is a reply to message #27593] Thu, 25 October 2001 12:53 Go to previous message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Joe Means wrote:
>
> ;I have a structure:
> segment = {seg:0, piece:0, rotation:0.0, length:0.0}
> segments = Replicate(segment, 2000)
>
> ;then I read data to fill array segments. For each segment there can
> be 1 or more values of piece,
> ;so the data in segments can look like:
> segment piece rotation
> 1 1 1.3
> 1 2 5.7
> 2 1 4.4
> 2 2 3.4
> 2 3 5.5
> ......
>
> ;then I calculate length for each segment and put those values in a
> vector array whose index is equal to segment-1, so each length can be
> easily matched to each segment. My question is can I effeciently
> match the length values into the structure for each piece without
> looping? Statistical programming languages like SAS have match-merge
> capabilities so this kind of thing is simple, but I am not aware of
> similar capabilities in IDL.
>

Will

IDL> segments.length=seg_len_vec[segments.segment-1]

do what you want?

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 5.5 jpeg and tiff
Next Topic: idlwave help

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

Current Time: Sun Nov 30 09:09:07 PST 2025

Total time taken to generate the page: 0.47465 seconds