|Date: ||Thu, 16 Sep 1999 19:30:15 -0500|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Shiling Zhang <shiling@MATH.WAYNE.EDU>|
|Organization: ||Wayne State University|
|Subject: ||Re: SAS/IML: "Select If" Function???|
|Content-Type: ||text/plain; charset=us-ascii|
The loc function does that. The loc function gives you the index which
satisfy the condition. I guess your selif is equivelent to
Hope it helps.
do i = 1 to 9;
print a b c;
A B C
-0.326593 2 1.5424369
1.5424369 3 0.2590291
0.2590291 5 0.7787204
-0.555834 9 0.7242336
> Does SAS/IML have an equivalent of Gauss's SELIF function?
> The SELIF function in Gauss defines a submatrix from an input matrix
> according to some Boolean expression. Such an extraction could be
> accomplished via a loop, but I am looking for a "vectorized" function.
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.