T = ismember(A, B)
[T, loc] = ismember(A, B)
| Parameter | Description |
|---|---|
| A | a variable |
| B | a variable |
| Parameter | Description |
|---|---|
| T | result of ismember. |
| loc | lowest index in B for each matching element of A, 0 where there is no match. |
T = ismember(A, B) returns an array of logical where the data inA is found in B.
[T, loc] = ismember(A, B) also returns loc, the lowest index in B for each element of A that is a member of B, and 0 otherwise.
A = [50 30 40 20];
B = [20 40 40 40 60 80];
T = ismember(A, B)
T = ismember(["a","b","f"], ["b", "f", "c"])
| Version | Description |
|---|---|
| 1.0.0 | initial version |