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

Home » Public Forums » archive » creating arrays in loops
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: creating arrays in loops [message #91479 is a reply to message #91476] Fri, 17 July 2015 18:47 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
wdolan@oxy.edu writes:

> So I figured out how to get all the X values in an array, but I need to have a way to recognize which scan goes with which x value, so that when I sort the X's, I can still know the scan.

Use the same sort index you get by sorting X to sort the scans:

sortIndex = Sort(x)
sortedScans = scans[sortIndex]
sortedX = X[sortIndex]

Now sortedX[0] is the biggest X, and it is associated with sortedScans
[0].

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: North America landmass extractiong using Land_mask function in idl
Next Topic: Adding arrays

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

Current Time: Wed Oct 08 13:36:18 PDT 2025

Total time taken to generate the page: 0.00225 seconds