remove row in A by referencing on another matrix, B, with true or false to produce another matrix c

1 次查看(过去 30 天)
Hi everyone, I want to reduce remove rows in matrix A, by referencing on matrix B to produce C. In this case, if its TRUE, remove the row
A = [1 1 1 0
0 1 1 1
0 1 1 0
1 0 1 0];
B =[True
False
False
True]
Results C =
C = [0 1 1 1
0 1 1 0];

采纳的回答

madhan ravi
madhan ravi 2019-9-9
Use the same approach shown in your previous questions!
C = A(B==false,:)
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by