Problem 2091. return row and column indices given 2 values which define a range
Inspired by problem http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice Inputs: - matrix A, lower limit, upper limit Ouputs: - indices of matrix elements which are bigger than or equal to lower limit and smaller than upper limit
A little complication: let your function be able to deal with a random order of the input arguments.
If all input arguments have the same size, assume that the first argument is the "matrix" with value(s).
Don't use "find" and don't use "regexp".
Solution Stats
Problem Comments
-
6 Comments
Show
3 older comments
goc3
on 2 Dec 2020
@Dyuman Joshi: the problem description specifically states that the inputs can be passed in in random order. What you indicate as an error is actually intended.
Dyuman Joshi
on 3 Dec 2020
@goc3 I must have overlooked it while solving the problem.
Thanks for pointing it out.
VBBV
on 18 Apr 2024
ridiculous test cases , idk who created the test cases
Solution Comments
Show commentsProblem Recent Solvers73
Suggested Problems
-
Replace NaNs with the number that appears to its left in the row.
3025 Solvers
-
976 Solvers
-
Check if number exists in vector
12875 Solvers
-
Relative ratio of "1" in binary number
1504 Solvers
-
5642 Solvers
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!