view doc/interpreter/set.txi @ 18679:a142f35f3cb6

doc: Fix unbalanced parentheses in documentation. * errors.txi, install.txi, sparse.txi, vectorize.txi: Fix unbalanced parentheses. * data.cc (Fall, Feye): Fix unbalanced parentheses. * rand.cc (Frandn, Frande): Fix unbalanced parentheses. * amd.cc (Famd): Fix unbalanced parentheses. * ccolamd.cc (Fccolamd): Fix unbalanced parentheses. * DASPK-opts.in: Fix unbalanced parentheses. * cplxpair.m, javamem.m, glpk.m, area.m, peaks.m, hgload.m, hotelling_test_2.m, hgsave.m: Fix unbalanced parentheses.
author Rik <rik@octave.org>
date Fri, 25 Apr 2014 15:49:03 -0700
parents d63878346099
children d00f6b09258f
line wrap: on
line source

@c Copyright (C) 1996-2013 John W. Eaton
@c
@c This file is part of Octave.
@c
@c Octave is free software; you can redistribute it and/or modify it
@c under the terms of the GNU General Public License as published by the
@c Free Software Foundation; either version 3 of the License, or (at
@c your option) any later version.
@c 
@c Octave is distributed in the hope that it will be useful, but WITHOUT
@c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@c FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
@c for more details.
@c 
@c You should have received a copy of the GNU General Public License
@c along with Octave; see the file COPYING.  If not, see
@c <http://www.gnu.org/licenses/>.

@node Sets
@chapter Sets

Octave has a limited number of functions for managing sets of data, where a
set is defined as a collection of unique elements.  In Octave a set is
represented as a vector of numbers.

@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, and difference of two sets.
Octave 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(setdiff)

@DOCSTRING(setxor)

@DOCSTRING(powerset)