Library: | xplore |
See also: | order sort rank |
Quantlet: | indexcat | |
Description: | returns the indices of the elements of a vector which fall into specified category. |
Usage: | ind = indexcat(y, value{, up}) | |
Input: | ||
y | n x 1 vector | |
value | scalar which specifies the lower band for the category (or the category itself if the optional parameter up is not given) | |
Output: | ||
ind | m x 1 vector, indices of the elements falling into the specified category, it returns -1 if there are no such elements. |
indexcat(5:18,8,10)
Contents of ind [1,] 4 [2,] 5 [3,] 6