the isnumeric function and the NaN

15 views (last 30 days)
Snoopy
Snoopy on 7 Sep 2018
Edited: Snoopy on 7 Sep 2018
I have a matrix array (A) that includes three column arrays. All columns contain integers except that one of the columns also include NaNs. When I type isnumeric(A), the output is a logical value 1. Apparently NaN is recognised as a numeric entry as otherwise MATLAB would return a logical value of 0. How is a NaN recognised exactly?
  6 Comments
Snoopy
Snoopy on 7 Sep 2018
Edited: Snoopy on 7 Sep 2018
This is it. Thanks for the effort and time put into the answer. I wanted to accept this as answer but it seems comment cannot be marked as such. Sorry for this.

Sign in to comment.

Answers (1)

Cesar Antonio Lopez Segura
Hi,
Write this in your command window:
isnan( [ 0 1 NaN] )

Categories

Find more on Data Type Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!