
2 minimum numbers
Posted:
Dec 22, 2012 12:07 PM


Hi I need some help. I have a 25x25 matrix of rand value between 2 & 2.5. I want to do following steps but I am stuck :(
1 finding minimum nd 2nd minimum number (not row or col just 1 element) in selected 3x3 matrix which is located at [(5,12) (5,13) (5,14); (6,12) (6,13) (6,14); (7,12) (7,13) (7,14)] of above matrix. but It must ignore (6,13) and find number in outer 8 locations.
2 from above minimum number it automatically select next matrix of 3x3 on following location [(i1, j1) (i1, j) (i1, j+1); (i, j1) (i, j) (i, j+1); (i+1, j1) (i+1, j) (i+1, j+1)] * minimum is at location (i,j) and find again minimum and 2nd minimum number

