MATLAB: How to find the indices of the 3 largest values in the matrix

indexlinear indexingmatrixmax

I have a matrix with varying values. I want to find the 3 largest values in this matrix and assign their indices to 3 different variables. How can I do this as simply as possible? Example matrix:
99 45 93 64
12 83 24 85
39 71 29 13
After finding the largest values – 99,93,85. I'd like to find their respective indices (with linear indexing). So that would be 1,7,11.
a = 1;
b = 7;
c = 11;

Best Answer

A = [99 45 93 64;
12 83 24 85
39 71 29 13];
[ii,ii] = sort(A(:),'descend');
out = ii(1:3);