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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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