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 次查看(过去 30 天)

采纳的回答

KSSV
KSSV 2022-12-26
A = [2 4 1; 4 5 2 ; 2 4 1 ;3 1 3; 2 6 3] ;
idx = any(A==1,2) ;
A(idx,:)=[];
A
A = 2×3
4 5 2 2 6 3

更多回答(1 个)

Image Analyst
Image Analyst 2022-12-26
To learn other fundamental concepts, invest 2 hours of your time here:

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by