Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: Français - Português - 日本語 - Русский
Scilab Help >> Code Matlab => Scilab > Matlab-Scilab equivalents > I > ismember (Matlab function)

ismember (Matlab function)

Data sets membership comparison

Matlab/Scilab equivalent

Matlab Scilab
// a)
AinB = ismember(A, B)

// b)
[AinB, loc] = ismember(A, B)
// c)
[rAinB, loc] = ismember(A, B, 'rows')
// a)
mA = members(A, B);
AinB = bool2s(mA~=0)
// b)
[mA, loc] = members(A, B)
// c)
[rmA, loc] = members(A, B, "rows");
rAinB = bool2s(rmA~=0)


In addition, Scilab provides the number of occurrences, can provide the locations of last occurrences instead of the first ones, can process A and B column-wise, and can ignore the order of elements in each row/column to be detected (detection of permutations).

Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:44 CET 2022