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 - 日本語 - Русский

Please note that the recommended version of Scilab is 6.1.1. This page might be outdated.
However, this page did not exist in the previous stable version.

Scilab Help >> Matlab to Scilab Conversion Tips > 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:
Wed Apr 01 10:14:07 CEST 2015