Clear Filters
Clear Filters

How to find largest magnitude in matrix?

7 views (last 30 days)
2 1 7
3 4 2
11 -22 13
B = largest magnitude
B = -22

Accepted Answer

Image Analyst
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))
  1 Comment
Roy dela Rama
Roy dela Rama on 9 Mar 2016
Thank you!
I will use this value, "maxB", for power method. It should work...

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!