matlab 找出两数组中相同的元素

>> a=[1,2,3,4,5,6]
a =
     1     2     3     4     5     6
>> b=[2,3,5,8,10]
b =
     2     3     5     8    10
>> intersect(a,b)
ans =
     2     3     5

转自:http://zhidao.baidu.com/link?url=x8KwFAkk8Lcbl6do11IDzqTheMa16AioqFeKXqf5Hmz7tT_fK8geG4xSWIeKoMVdWAPurH_cMMfkk5WfJJ19la

你可能感兴趣的:(数学,Matlab,基本知识)