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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 842 views
  • 0 likes
  • 1 in conversation