My A = [10 1 6 8 2 3 1 3]. As we can see the minimum value is 1 and is seen twice at index 2 and 7.
My MATLAB code is below:
function [m,im] = myMinInd(A)