Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这很简单,但很难找到合适的功能。我有一个向量a = [1 2 3 4]和另一个向量b = [1 2 6 8]。我想返回所有a不在b. 在这种情况下,它将是[3 4]。你怎么做到这一点?
a = [1 2 3 4]
b = [1 2 6 8]
a
b
[3 4]
你试过setdiff吗?
setdiff
c = setdiff(a,b)