Mercurial > hg > octave-lyh
annotate doc/interpreter/set.txi @ 11117:3cbc0d77db48 ss-3-3-53
update version info for snapshot
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Oct 2010 02:25:32 -0400 |
parents | 6a5a0c9df5d7 |
children | fd0a3ac60b0e |
rev | line source |
---|---|
8920 | 1 @c Copyright (C) 1996, 1997, 1999, 2000, 2002, 2007, 2008, 2009 John W. Eaton |
7018 | 2 @c |
3 @c This file is part of Octave. | |
4 @c | |
5 @c Octave is free software; you can redistribute it and/or modify it | |
6 @c under the terms of the GNU General Public License as published by the | |
7 @c Free Software Foundation; either version 3 of the License, or (at | |
8 @c your option) any later version. | |
9 @c | |
10 @c Octave is distributed in the hope that it will be useful, but WITHOUT | |
11 @c ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
12 @c FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
13 @c for more details. | |
14 @c | |
15 @c You should have received a copy of the GNU General Public License | |
16 @c along with Octave; see the file COPYING. If not, see | |
17 @c <http://www.gnu.org/licenses/>. | |
3294 | 18 |
4167 | 19 @node Sets |
3294 | 20 @chapter Sets |
21 | |
8828 | 22 Octave has a limited number of functions for managing sets of data, where a |
7001 | 23 set is defined as a collection of unique elements. In Octave a set is |
6741 | 24 represented as a vector of numbers. |
3294 | 25 |
6741 | 26 @DOCSTRING(unique) |
27 | |
28 @menu | |
9032
349616d9c38e
Cleanup top-level documentation menu in octave.texi
Rik <rdrider0-list@yahoo.com>
parents:
8920
diff
changeset
|
29 * Set Operations:: |
6741 | 30 @end menu |
31 | |
32 @node Set Operations | |
33 @section Set Operations | |
6550 | 34 |
6741 | 35 Octave supports the basic set operations. That is, Octave can compute |
10712
6a5a0c9df5d7
union.m: Remove seealso reference to deprecated function.
Rik <octave@nomad.inbox5.com>
parents:
9032
diff
changeset
|
36 the union, intersection, and difference of two sets. |
8347
fa78cb8d8a5c
corrections for typos
Brian Gough<bjg@network-theory.co.uk>
parents:
7018
diff
changeset
|
37 Octave also supports the @emph{Exclusive Or} set operation, and |
6741 | 38 membership determination. The functions for set operations all work in |
39 pretty much the same way. As an example, assume that @code{x} and | |
40 @code{y} contains two sets, then | |
41 | |
42 @example | |
43 union(x, y) | |
44 @end example | |
45 | |
46 @noindent | |
47 computes the union of the two sets. | |
48 | |
49 @DOCSTRING(ismember) | |
6502 | 50 |
3368 | 51 @DOCSTRING(union) |
3294 | 52 |
6502 | 53 @DOCSTRING(intersect) |
3294 | 54 |
6502 | 55 @DOCSTRING(setdiff) |
56 | |
57 @DOCSTRING(setxor) |