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
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!