Complex number calculation ?

1 Ansicht (letzte 30 Tage)
Yuling CAO
Yuling CAO am 19 Sep. 2016
Bearbeitet: Stephen23 am 19 Sep. 2016
Does anyone know that when I calculate magnitudes of a matrix with all complex numbers, why there are some NaN happening?
  1 Kommentar
Stephen23
Stephen23 am 19 Sep. 2016
Bearbeitet: Stephen23 am 19 Sep. 2016
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

Melden Sie sich an, um zu kommentieren.

Antworten (1)

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

Community Treasure Hunt

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

Start Hunting!

Translated by