What is meaning of NaN+NaNi?

51 Ansichten (letzte 30 Tage)
Antony Aravind
Antony Aravind am 18 Jul. 2022
Kommentiert: Andy Globe am 28 Feb. 2023
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 Kommentar
Andy Globe
Andy Globe am 28 Feb. 2023
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

SlipperyGnome
SlipperyGnome am 18 Jul. 2022
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!

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by