MATLAB: Is it possible to find the max value and position within the multidimensional array maxmultidimensional array A(:,:,1) = [1,1,1;2,2,9;3,3,3;6,0,0] A(:,:,2) = [4,5,4;5,5,5;6,0,0;6,0,0] A(:,:,3) = [4,5,4;5,5,5;6,0,0;16,0,0] Best Answer [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 SolutionsMATLAB: Find the position of a minimum in an array a=[ 3 4 2 6 0 9 ; 3 5 8 2 5 9]; [min_val,idx]=min(a(:));[row,col]=ind2sub(size(a),idx) MATLAB: Reshape multidimensional matrix by page A = rand(64, 64, 16);B = reshape(permute(reshape(A, 64, 64*4, 4), [1,3,2]), [256, 256]);C = [A(:,:,1) A(:,:,2) A(:,:,3) A(:,:,4); ... A(:,:,5) A(:,:,6) A(:,:,7) A(:,:,8); ... A(:,:,9) A(:,:,10) A(:,:,11) A(:,:,12); ... A(:,:,13) A(:,:,14) A(:,:,15) A(:,:,16)];isequal(B, C) Related QuestionPlace each dimension of matrix into a cell arrayHow to repeat the rows of a matrix by a varying numberReplacing several values in multidimensional array simultaneouslyPosition of the element have small valueDelete certain entries in a 3D matrixHow to filter a matrixReshape 3d matrix to obtain a column vector
Best Answer