simple-squiggle/node_modules/mathjs/docs/reference/functions/setSymDifference.md

48 lines
989 B
Markdown

<!-- Note: This file is automatically generated from source code comments. Changes made in this file will be overridden. -->
# Function setSymDifference
Create the symmetric difference of two (multi)sets.
Multi-dimension arrays will be converted to single-dimension arrays before the operation.
## Syntax
```js
math.setSymDifference(set1, set2)
```
### Parameters
Parameter | Type | Description
--------- | ---- | -----------
`a1` | Array &#124; Matrix | A (multi)set
`a2` | Array &#124; Matrix | A (multi)set
### Returns
Type | Description
---- | -----------
Array &#124; Matrix | The symmetric difference of two (multi)sets
### Throws
Type | Description
---- | -----------
## Examples
```js
math.setSymDifference([1, 2, 3, 4], [3, 4, 5, 6]) // returns [1, 2, 5, 6]
math.setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]]) // returns [1, 2, 5, 6]
```
## See also
[setUnion](setUnion.md),
[setIntersect](setIntersect.md),
[setDifference](setDifference.md)