Version:

Last Modified: January 9, 2017

Returns the elements that are in at least one of the inputs.

c = sets_union(a, b)

c = sets_union(a, b, 'rows')

c = sets_union(a, b, order)

c = sets_union(a, b, 'rows', order)

[c, d, e] = sets_union(a, b)

[c, d, e] = sets_union(a, b, 'rows')

[c, d, e] = sets_union(a, b, order)

[c, d, e] = sets_union(a, b, 'rows', order)Legacy name: union

Array of any dimensions. a should be the same class as b or double.

Array of any dimensions. b should be the same class as a or double.

If used, c returns the rows that are in a or b. You can specify this input when a and b are matrices with the same number of columns.

Indicates whether the output should be sorted. order is a string that accepts the following values.

Name | Description |
---|---|

'sorted' (default) | Sorts the output. |

' stable' | Does not sort the output. |

Elements that are in a or b. If a contains repeated elements that also are in b, c contains as many of those repeated elements as are in a. c is a vector or matrix. If a is a row vector, c is a row vector, otherwise, c is a column vector. The output data type is not the greater data type of the two inputs. For example, if one input is double precision and the other input is single precision floating point number, the output is a single type.

Indexes in a of the elements in c. d is a vector of doubles.

Indexes in b of the elements in c. e is a vector of doubles.

A = [1, 2, 3, 4, 5, 6, 7, 8, 9] B = [2, 3, 5, 7] [C, I] = sets_union(A, B)

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported