Let two vectors lo and hi be given.
The job is to create a index vector like so
idx = [lo(1):hi(1) lo(2):hi(2) ...]
Where : is the colon operator.
One can assume that all entries are positve integers. Delete all pairs where lo(i) > hi(i).
For example:
idx = [1 2 3 5 6 7 8 10 11 12]
idx = [6 7 8]
Find relatively common elements in matrix rows
645 Solvers
The Hitchhiker's Guide to MATLAB
2696 Solvers
466 Solvers
Rotate input square matrix 90 degrees CCW without rot90
323 Solvers
437 Solvers