I have m*n matrix. I want keep only those rows whose atleast one element is greater than any specific value such as 1.
1 次查看(过去 30 天)
显示 更早的评论
I have m*n matrix. I want keep only those rows whose atleast one element is greater than any specific value such as 1.
0 个评论
采纳的回答
Mathieu NOE
2021-10-14
hello
try this
m = 3;
n = 5;
A= 1.15*rand(m,n);
threshold = 1;
a = A>threshold;
rows = find(any(a, 2));
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!