Problem 647. Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes.
Absolute indexing refers to specific elements with a single scalar rather than two (row and column). The upper left entry is value 1, the lower right is the highest value. MATLAB is column major, so you count down the rows in a specific column first, moving right as needed until you reach the end.
Indexing into a vector is really using this kind of indexing, but it is more natural feeling.
Given a matrix M, return the absolute indices where M is greater than scalar, LB (Lower Bound) and less than UB (Upper Bound). (See Binary comparison to satisfy two conditions)
Solution CommentsShow comments
Problem Recent Solvers240