Problem 1203. Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly with duplicates, return K such that R(K) == V. The elements of R may be numeric or string.
For example, refIndex(9:-1:5,[7 5 6 5]) should return [3 5 4 5].
Solution Stats
Problem Comments
-
1 Comment
Nicholas Howe
on 14 Jan 2013
Can this be done efficiently using regexp?
Solution Comments
Show commentsProblem Recent Solvers301
Suggested Problems
-
Return the largest number that is adjacent to a zero
5507 Solvers
-
Swap the first and last columns
22431 Solvers
-
Find relatively common elements in matrix rows
2149 Solvers
-
655 Solvers
-
Make a vector of prime numbers
961 Solvers
More from this Author11
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!