MATLAB: Position of the element have small value

matrix manipulationminimum

A=
3 4 5 6 7
1 2 4 9 4
5 3 0 7 6
6 0 1 8 5
2 9 8 1 3
find the position of min value in each column sore the position in the variable
for first coln min value is 1 now the position (1,2) p=1 q=2 like that next iteration take second column and find the position

Best Answer

[~,ii] = min(A);
position_pq = [1:size(A,2);ii];