If any of the matrix element or elements value is 1 or greater than 1 , then how can I delete that row or rows from a (M * N) matrix ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Sourasis Chattopadhyay
el 26 de Dic. de 2022
Respondida: Image Analyst
el 26 de Dic. de 2022
0 comentarios
Respuesta aceptada
KSSV
el 26 de Dic. de 2022
A = [2 4 1; 4 5 2 ; 2 4 1 ;3 1 3; 2 6 3] ;
idx = any(A==1,2) ;
A(idx,:)=[];
A
2 comentarios
Más respuestas (1)
Image Analyst
el 26 de Dic. de 2022
To learn other fundamental concepts, invest 2 hours of your time here:
0 comentarios
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!