Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

sets_union (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: sets

Requires: MathScript RT Module


c = sets_union(a, b)

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

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

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

Legacy Name: union


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



Name Description
a Specifies a vector or matrix.
b Specifies a vector or matrix.
'rows' Specifies that 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.


Name Description
c Returns in ascending order the 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.
d Returns the indexes in a of the elements in c. d is a vector of integers.
e Returns the indexes in b of the elements in c. e is a vector of integers.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


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

Related Topics



 Was this document helpful?  submit
  Helpful Not Helpful