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

Home » Public Forums » archive » Re: All twisted up over reverse indices!
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: All twisted up over reverse indices! [message #94003 is a reply to message #93998] Mon, 19 December 2016 09:37 Go to previous messageGo to previous message
Stephen Williams is currently offline  Stephen Williams
Messages: 1
Registered: December 2016
Junior Member
>
> I found this helped (scroll down to the section on reverse indices):
> http://www.idlcoyote.com/tips/histogram_tutorial.html

For completeness, I figured out the problem and determined how to extract what I needed. My issue came primarily from improper referencing of the arrays. For example, the following line gave the incorrect indices when used with multiple matches:

ra_i_m(i) = ra_i(match1[match1[part_two(i)]:match1[part_two(i+1)]-1])

The problem is in the end, and should be this:

ra_i_m(i) = ra_i(match1[match1[part_two(i)]:match1[part_two(i)+1]-1])

The parentheses are critical here, as I want the next array element in "match1" and not the next array element in "part_two".

Distances were obtained similarly via the following line:

d(match1[match1[part_thr(i)]:match1[part_thr(i)+1]-1])

That is to say, the above gives the distances for each element in the sub-array denoted by the ":".

I hope this may help someone, I am sure relieved that my problem has been solved.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: About "Invalid HDF file or filename" using hdf_sd_start on a valid HDF file due to loop through too many hdf files
Next Topic: IDL Bridge

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

Current Time: Wed Oct 08 13:21:09 PDT 2025

Total time taken to generate the page: 0.00163 seconds