MATLAB: Find the position of a minimum in an array matrixminimum Hi there! I would like to find the position of a minimum in an array.Something like a=[ 3 4 2 6 0 9 ; 3 5 8 2 5 9] pos_min= [1,5] Best Answer a=[ 3 4 2 6 0 9 ; 3 5 8 2 5 9]; [min_val,idx]=min(a(:));[row,col]=ind2sub(size(a),idx) Related SolutionsMATLAB: Position of the element have small value [~,ii] = min(A);position_pq = [1:size(A,2);ii]; MATLAB: Is it possible to find the max value and position within the multidimensional array [val,idx]=max(A(:))[r,c,i]=ind2sub(size(A),idx)r gives you row number, c gives you column number and i gives you the multidimensional array, which is 3 in this case. Related QuestionMatlab MinimumHow do i find a maximum elements in a specific rowMulti-dimensional array, minimum, coordinateMinimum output matrix from data
Best Answer