What is meaning of NaN+NaNi?

42 次查看(过去 30 天)
Antony Aravind
Antony Aravind 2022-7-18
评论: Andy Globe 2023-2-28
I wrote and run a program, where the output resulted is "NaN+NaNi" . I need to know the meaning of "NaN+NaNi" and thus kindly guide me to correct it.
  1 个评论
Andy Globe
Andy Globe 2023-2-28
NaN+NaNi is a mathematical notation that represents the result of an undefined operation or calculation involving both real and imaginary numbers. NaN stands for "Not a Number," while NaNi represents "Not a Number" for imaginary numbers. This result typically occurs when performing calculations that result in an infinite or undefined value, such as dividing zero by zero. learn more over building educational app development.

请先登录,再进行评论。

回答(1 个)

SlipperyGnome
SlipperyGnome 2022-7-18
MATLAB represents values that are not real or complex numbers with a special value called NaN which means 'Not a Number'. This means you are probably evaluating expressions like 0/0 or inf/inf or so on.
Similarly, when you have a complex number, the displayed values are real numbers + the complex part + 'i'. There must be some invalid expressions usage in the complex part of your program too.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by