BookmarkSubscribeRSS Feed
model_coder
Calcite | Level 5
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.
1 REPLY 1
model_coder
Calcite | Level 5
I found the loc function that does exactly what I want. Thanks.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 1 reply
  • 937 views
  • 0 likes
  • 1 in conversation