Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

sets_diff (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

Owning Class: sets

Requires: MathScript RT Module

Syntax

c = sets_diff(a, b)

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

[c, d] = sets_diff(a, b)

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

Legacy Name: setdiff

Description

Returns the elements of the first input that are not in the second input.

Examples

Inputs

Name Description
a Specifies a vector or matrix.
b Specifies a vector or matrix.
'rows' Specifies that c returns the rows in a that are not in b. You can specify this input when a and b are matrices with the same number of columns.

Outputs

Name Description
c Returns the elements in a that are not in b. c is a vector or matrix.
d Returns the indexes in a of the elements in c. d is a vector of integers.

Examples

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

Related Topics

is_membermx
sets_intersect
sets_union
sets_unique
sets_xor


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit