Could anyone tell me why NaN is being present instead of numbers.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Prabha Kumaresan
am 5 Feb. 2018
Kommentiert: Jan
am 5 Feb. 2018
Could anyone tell me why NaN is being present instead of numbers.
0 Kommentare
Akzeptierte Antwort
Birdman
am 5 Feb. 2018
Bearbeitet: Birdman
am 5 Feb. 2018
Read the following blog. It is helpful:
3 Kommentare
Jan
am 5 Feb. 2018
@Prabha: To avoid the creation of NaN value, you have to avoid to perform calculations, which have NaN as result. There is no general way to "avoid" them, because they are the mathematically correct result for certain operations.
You get e.g. NaN for the numerical value of an imported Excel file, if the corresponding cell contains a string. Or you get NaN, if you divide by 0. If you need a method to catch this, post the relevant part of your code, as usual.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Numeric Types 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!