MATLAB: Minimum of an array

minimum of array

Hi, I have a 10*10 array.I need to find the minium of all the rows of the array except selected ones.For eg. to find the minimum of the array except 2nd and fifthrow.

Best Answer

r = [1 3 5];
A1 = A;
A1(r,:) = nan;
[c,idx] = min(A1(:));
[i1,j1] = ind2sub(size(A1),idx);