Why does setdiff answer depend on order of arguments?
古いコメントを表示
>>bob = {'a','b','c'};
>>bill = {'a','b','c', 'd','e'}
As expected,
>>A = setdiff(bill,bob)
A =
'd' 'e'
BUT
>> B = setdiff(bob,bill)
B =
Empty cell array: 1-by-0
WHY??
採用された回答
その他の回答 (2 件)
madhan ravi
2019 年 9 月 9 日
編集済み: madhan ravi
2019 年 9 月 9 日
bob not in bill (nothing unique all elements of bob belong to bill)
help setdiff
Walter Roberson
2019 年 9 月 9 日
0 投票
setdiff implements set subtraction A \ B which is not commutative
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!