From: darthshak on
An immediate solution which comes to mind :

If you want to find the M largest values of vector A:
1) Sort the original array and store the result in B
2) Find the Mth largest value(which is in the (N-M+1)th location).
3) Using find() again, locate the indices of all elements greater than the above element.

Code:
B = sort(A);
smallest = B(N-M+1);
indices = find(A >= smallest);

Hope it helps. Do let me know if you have a more elegant way!