Chapter Contents |
Previous |
Next |

Language Reference |

**XSECT(***matrix1<, matrix2,..., matrix15>***)**

where *matrix* is a numeric or
character matrix or quoted literal.

The XSECT function returns as a row vector the sorted set (without duplicates) of the element values that are present in all of its arguments. This set is the intersection of the sets of values in its argument matrices. When the intersection is empty, the XSECT function returns a null matrix (zero rows and zero columns). There can be up to 15 arguments, which must all be either character or numeric. For characters, the element length of the result is the same as the shortest of the element lengths of the arguments. For comparison purposes, shorter elements are padded on the right with blanks.

For example, the statements

a={1 2 4 5}; b={3 4}; c=xsect(a,b);return the result shown:

C 1 row 1 col (numeric) 4

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.