Delete specific rows from a matrix
显示 更早的评论
Hi all,
i want to delete rows which with the values 1 in their columns, how can i do it ?
For example:
A= [7,7;2,2;1,1;3,3]
Becomes
A=[7,7;2,2;3,3]
Thank you !
P.s I've searched other posts before posting this .. couldn't find any help
采纳的回答
更多回答(1 个)
Honglei Chen
2014-8-18
编辑:Honglei Chen
2014-8-18
A(any(A==1,2),:) = []
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!