MATLAB Answers

0

database returns null as -2147483648

Asked by Azura Hashim on 13 Aug 2017
Latest activity Commented on by Azura Hashim on 14 Aug 2017
When I executed a query using MySQL console null values returned correctly. But when I queried the same data using database function in Matlab all the null values were returned as -2147483648. Has anyone encountered this?

  2 Comments

Looks like -2^31 which is the most negative possible 32 bit integer. What is class() of the returned data? If it is integral then there would be no representation available in the data type to signal missing. Floating point numbers have NaN designed in, but integral data types do not.
It is an integer class. Thank you. I didn't realise there is not a NaN equivalent for integers.

Sign in to comment.

0 Answers