[英]Find column vectors contained in B but not in A - MATLAB
I have matrix A
of size 10x100
and matrix B
with size 10x200
. 我有矩阵
A
大小的10x100
和矩阵B
与大小10x200
。
How to find the column vectors contained in B
but not in A
? 如何找到包含在列向量
B
而不是在A
? ( A and B do not have the same number of columns) (A和B的列数不同)
to elaborate @Cheery's comment with an example. 用一个例子来详细说明@ Cheery的评论。
A=[1;4];
B=[1 2 4;4 5 6];
C=setdiff(B',A','rows')';
more details see http://www.mathworks.com/help/matlab/ref/setdiff.html 有关详细信息,请参阅http://www.mathworks.com/help/matlab/ref/setdiff.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.