MATLAB: How to find largest magnitude in matrix max 2 1 7 3 4 2 11 -22 13 B = largest magnitude B = -22 Best Answer Try this:B=[2 1 73 4 211 -22 13][maxB, index] = max(abs(B(:)))maxB = maxB * sign(B(index)) Related SolutionsMATLAB: Find largest magnitude in array A=[-0.1;1;-5;-0.8;-0.4];tto=find(abs(A) == max(abs(A)))tt=find(abs(A) ~= max(abs(A))) MATLAB: How to assign the equality relationship for the elements symmetry to the diagnoal of a matrix % random test matrixA = rand(4)% symmetrize of A by copying the lower part to upper partB = tril(A)+tril(A,-1).'for i=1:0 % because you require a for-loopend Related QuestionHow to find second largest OR third largest Or any largest value among the columns of a matrixFinding positions and comparing two arraysBode() magnitudeReplace one matrix with the positon indicated in another matrixRetrun largest numbersFETCH LARGEST NUMBERS
Best Answer