Get row number with certain data in it
Show older comments
Hello together,
i want to find a solution for my problem:
I have a 230x2 Matrix, which contains different numbers. I want the programm to tell me, which row contains numbers higher than 400.
How can i do that?
I tried the "find"-function but it didnt bring me to a useful result.
Thank you.
MG.
Answers (1)
"I tried the "find"-function but it didnt bring me to a useful result."
It works for me:
% Fake data:
M = randi(9,7,2);
M(5,1) = 789
% Find row:
[R,~] = find(M>400)
1 Comment
Mert Gurer
on 22 Sep 2021
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!