MATLAB: Find the minimum of a matrix matrixmatrix manipulationminmumvector Hi, Can someone please help me to find the row number corresponding to the minimum value of the jth column of a matrix? thanks. Best Answer [val idx] = min(X(:,j));idx will be the row number. Related SolutionsMATLAB: Find the minimum value A=magic(5) % Exampleout=min(A(:))% No, min function don't allow just inetgerhelp min MATLAB: Find the location of minimum value EditA=rand(4,4,4,4) [ii1,ii2,ii3,ii4]=size(A)count=0id=zeros(ii3*ii4,4);for k=1:ii3for p=1:ii4 count=count+1; v=A(:,:,k,p); [val,idx]=min(v(:)); [id1,id2]=ind2sub(size(v),idx); minval(count)=val; idx1(count)=id1; idx2(count)=id2; idx3(count)=k; idx4(count)=p; id(count,:)=[id1 id2 k p] % correspondant indicesendend Related QuestionMatrix question (finding the smallest number in each row)Find maximum and minimumHow to find the maximum value in a matrixReturning Position in Array or Matrices for max()
Best Answer