Mercurial > octave-nkf
view doc/interpreter/set.txi @ 6778:083721ae3dfa
[project @ 2007-07-18 17:03:10 by jwe]
author | jwe |
---|---|
date | Wed, 18 Jul 2007 17:03:11 +0000 |
parents | 00116015904d |
children | 8b0cfeb06365 |
line wrap: on
line source
@c Copyright (C) 1996, 1997, 2007 John W. Eaton @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. @node Sets @chapter Sets Octave has a limited set of functions for managing sets of data, where a set is defined as a collection unique elements. In Octave a set is represented as a vector of numbers. @DOCSTRING(create_set) @DOCSTRING(unique) @menu * Set Operations:: @end menu @node Set Operations @section Set Operations Octave supports the basic set operations. That is, Octave can compute the union, intersection, complement, and difference of two sets. Octave can also supports the @emph{Exclusive Or} set operation, and membership determination. The functions for set operations all work in pretty much the same way. As an example, assume that @code{x} and @code{y} contains two sets, then @example union(x, y) @end example @noindent computes the union of the two sets. @DOCSTRING(ismember) @DOCSTRING(union) @DOCSTRING(intersect) @DOCSTRING(complement) @DOCSTRING(setdiff) @DOCSTRING(setxor)