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

Home » Public Forums » archive » Re: FIND the indexes of a value in a matrix
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: FIND the indexes of a value in a matrix [message #29980] Tue, 02 April 2002 13:34 Go to previous message
chi-kuei is currently offline  chi-kuei
Messages: 5
Registered: March 2002
Junior Member
Thanks a lot.

Chi-Kuei

"David Fanning" <david@dfanning.com> wrote in message
news:MPG.17138b63d0c4008598985b@news.frii.com...
> chi-kuei (twcollie@hotmail.com) writes:
>
>> I have a 1000 X 4 matrix. I want to know the position of one value,
say,
>> 2342, in that matrix. I am able to do this in MATLAB with "find". How
can I
>> do this in IDL? Is there a command in IDL does this? (I don't see any in
the
>> help file.) The only thing that I can do is creating for-loops.
>
> In IDL, you use the WHERE function:
>
> index = WHERE(matrix EQ 2342, count)
> IF count GT 0 THEN print, index, matrix[index]
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: Transparent texture mapped polygons
Next Topic: Re: Findfile finds no files

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

Current Time: Fri Oct 10 10:57:20 PDT 2025

Total time taken to generate the page: 0.40189 seconds