One approach:
a = [2 10 10 5 7 4 10];
idx = ((a == 10).*[1:numel(a)]);
idx(idx > 0)
If you want to use this with a matrix, you will need to use the reshape function to convert it to a linear vector, and then the ind2sub function to get the row and column indices.
