How to find largest magnitude in matrix?
8 views (last 30 days)
Show older comments
Roy dela Rama
on 9 Mar 2016
Commented: Roy dela Rama
on 9 Mar 2016
2 1 7
3 4 2
11 -22 13
B = largest magnitude
B = -22
0 Comments
Accepted Answer
Image Analyst
on 9 Mar 2016
Try this:
B=[2 1 7
3 4 2
11 -22 13]
[maxB, index] = max(abs(B(:)))
maxB = maxB * sign(B(index))
More Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!