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!