Chapter Contents |
Previous |
Next |
Language Reference |
a={1 0 2 3 0}; b=loc(a);result in the row vector
B 1 row 3 cols (numeric) 1 3 4since the first, third, and fourth elements of A are nonzero. If every element of the argument vector is 0, the result is empty; that is, B has zero rows and zero columns.
x={1 1 0, 0 -2 2, 0 0 3}; y=x[loc(vecdiag(x)>0),];The result is
Y 2 rows 3 cols (numeric) 1 1 0 0 0 3since the first and third rows of X have positive elements on the diagonal of X.
a={0, -1, 2, 0}; y=a[loc(a>0),];The result is
Y 1 row 1 col (numeric) 2
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.