MATLAB: How to determine the index of two smallest probability in a vector

matricesmatrixvector

I have a vector A
A=[0.7188 0.0625 0.0625 0.0469 0.0313 0.0156 0.0156 0.0156 0.0156 0.0156]
How can I find the two smallest probabilities and result only the index .The result will be :-
b=[9 10]

Best Answer

A=[0.7188 0.0625 0.0625 0.0469 0.0313 0.0156 0.0156 0.0156 0.0156 0.0156]
index = find(ismember(A,min(A)))
b = index(end-1:end)