Statistical programming, matrix languages, and more

find function in IML

Reply
Contributor
Posts: 21

find function in IML

Is there a find function in IML that will let me find indices of nonzero elements? For example I = Find(X[,1]=2) should return indices for all rows in matrix X where the first column value is equal to 2.
One option is to implement this function as a subroutine and call this from my program. But I have peformance concerns as I call this function several times in my code.
Any help will be appreciated.
Contributor
Posts: 21

Re: find function in IML

I found the loc function that does exactly what I want. Thanks.
Ask a Question
Discussion stats
  • 1 reply
  • 193 views
  • 0 likes
  • 1 in conversation