如何在不进行MATLAB排序的情况下从A中删除集合A和B的交集? [英] How do I delete the intersection of sets A and B from A without sorting in MATLAB?
本文介绍了如何在不进行MATLAB排序的情况下从A中删除集合A和B的交集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
两个矩阵A和B:
A = [1 2 3
9 7 5
4 9 4
1 4 7]
B = [1 2 3
1 4 7]
矩阵B的所有行都是矩阵A的成员.我希望不进行排序就从A删除A和B的公共行.
All rows of matrix B are members of matrix A. I wish to delete the common rows of A and B from A without sorting.
我尝试过setdiff(),但这对输出进行了排序.
I have tried setdiff() but this sorts the output.
对于我的特殊问题(蛋白质结构中的原子坐标),保持行的有序完整性很重要.
For my particular problem (atomic coordinates in protein structures) maintaining the ordered integrity of the rows is important.
推荐答案
使用 查看全文