首页 > 其他 > 详细

matlab中setdiff的用法

时间:2015-01-11 13:33:49      阅读:745      评论:0      收藏:0      [点我收藏+]

帮助文档内容:

    SETDIFF(A,B) when A and B are vectors returns the values
    in A that are not in B.  The result will be sorted.  A and B
    can be cell arrays of strings.
 
    SETDIFF(A,B,‘rows‘) when A are B are matrices with the same
    number of columns returns the rows from A that are not in B.

理解:

matlab中setdiff()函数作用:判断2个数组中不同元素

c = setdiff(A, B) 
返回在A中有,而B中没有的值,结果向量将以升序排序返回。在集合论中,c = A - B。A和B也可以是字符串细胞数组。
c = setdiff(A, B, ‘rows‘)

当A和B是具有相同列数的矩阵时,返回A中有而B中没有的那些行。



matlab中setdiff的用法

原文:http://blog.csdn.net/u013476464/article/details/42610433

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!