is_membermx

Version:

Determines whether an element in one matrix is an element of another matrix.

Syntax

c = is_membermx(a, b)
c = is_membermx(a, b, 'rows')
[c, d] = is_membermx(a, b)
[c, d] = is_membermx(a, b, 'rows')
Legacy name: ismember

a

Array of any dimension, if 'rows' is not specified. If 'rows' is specified, a can only be a matrix.

b

Array of any dimension, if 'rows' is not specified. If 'rows' is specified, b can only be a matrix.

'rows'

If you specify 'rows', a and b must have the same number of columns, and is_membermx(a, b, 'rows') determines whether the rows of a are in b.

c

Array of any dimension of Boolean values. An element in c is 1 if and only if the corresponding element of a is a member of b. Otherwise, the element is 0. c is an array or a matrix of the same size as a.

d

Positions in b of the elements of a. If an element in a is not in b, the corresponding element in d is 0. d is an array of integers.

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

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices