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 Solvers71
Suggested Problems
-
4117 Solvers
-
599 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
11965 Solvers
-
Cell Counting: How Many Draws?
2125 Solvers
-
Generate a random matrix A of (1,-1)
336 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!