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

1 visualización (últimos 30 días)
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];

Respuesta aceptada

madhan ravi
madhan ravi el 9 de Sept. de 2019
Use the same approach shown in your previous questions!
C = A(B==false,:)
  4 comentarios

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by