Complex number calculation ?

조회 수: 1 (최근 30일)
Yuling CAO
Yuling CAO 2016년 9월 19일
편집: Stephen23 2016년 9월 19일
Does anyone know that when I calculate magnitudes of a matrix with all complex numbers, why there are some NaN happening?
  댓글 수: 1
Stephen23
Stephen23 2016년 9월 19일
편집: Stephen23 2016년 9월 19일
Because you are doing one of the operations listed on the NaN documentation that result in NaN values:
  • Any arithmetic operation on a NaN, such as sqrt(NaN)
  • Addition or subtraction, such as magnitude subtraction of infinities as (+Inf)+(-Inf)
  • Multiplication, such as 0*Inf
  • Division, such as 0/0 and Inf/Inf
  • Remainder, such as rem(x,y) where y is zero or x is infinity

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

답변 (1개)

Star Strider
Star Strider 2016년 9월 19일
Since I do not have your matrix, my guess is that there are NaN or Inf values in it.

카테고리

Help CenterFile Exchange에서 Math Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by