C = setdiff(A, B)
[C, ia] = setdiff(A, B)
| Parameter | Description |
|---|---|
| A, B | Input arrays. |
| Parameter | Description |
|---|---|
| C | Sorted values that are in A and not in B. |
| ia | Index vector into A. |
setdiff(A, B) returns the sorted values that occur in A but not in B.
A = [5 7 1];
B = [3 1 1];
C = setdiff(A, B)
| Version | Description |
|---|---|
| 2.0.0 | initial version |