Mercurial > octave-nkf
view doc/interpreter/set.txi @ 6741:00116015904d
[project @ 2007-06-18 16:07:14 by jwe]
author | jwe |
---|---|
date | Mon, 18 Jun 2007 16:07:14 +0000 |
parents | 1b7a6061a05d |
children | 083721ae3dfa |
line wrap: on
line source
@c Copyright (C) 1996, 1997 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)