How to find largest magnitude in matrix?

조회 수: 12 (최근 30일)
Roy dela Rama
Roy dela Rama 2016년 3월 9일
댓글: Roy dela Rama 2016년 3월 9일
2 1 7
3 4 2
11 -22 13
B = largest magnitude
B = -22

채택된 답변

Image Analyst
Image Analyst 2016년 3월 9일
Try this:
B=[2 1 7
3 4 2
11 -22 13]
[maxB, index] = max(abs(B(:)))
maxB = maxB * sign(B(index))
  댓글 수: 1
Roy dela Rama
Roy dela Rama 2016년 3월 9일
Thank you!
I will use this value, "maxB", for power method. It should work...

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by