absmax

Returns the value of the element with the largest absolute value in the input matrix.
295 Downloads
Updated 4 Apr 2013

View License

Returns the value of the element with the largest abs value in the input matrix 'A'. Input 'A' must be numeric, but can be any size and shape.

This is useful because it eliminates iterating through all the dimensions of a matrix.

examples:
A=[-5 3 2 3; 3 2 1 4];
absmax(A) will return -5

A=[643,10];
absmax(A) will return 643

Cite As

Adam McNeilly (2024). absmax (https://www.mathworks.com/matlabcentral/fileexchange/41115-absmax), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0