我有两个矩阵A
“只有一列”,B
它有多个列,但行数相同,A
如下所示,我想做的是检查 A 中元素等于 -1 的行并删除删除这行来自矩阵 A 和 B,所以在下面的示例中,我想从矩阵 A 和 B 中删除行索引 3 和 6,有什么建议吗?
A= 6
3
-1
6
6
-1
2
4
and B= -0.511774504646677 0.435674206557952 1.07400000000000
-0.509871997194459 0.437576714010170 1.07400000000000
-0.507969489742241 0.439479221462388 1.07400000000000
-0.506586007364545 0.429374013677012 1.07100000000000
-0.504201297562686 0.439754515167456 1.07100000000000
-0.501883219358233 0.428847974750132 1.07100000000000
-0.501415044713309 0.431930562861652 1.07100000000000
-0.499537085744345 0.433808521830616 1.07100000000000