3

What is the Octave NaN for? Is dot wrong delimiter?

>> bin2dec ('10.1')
ans = NaN
Excellll
  • 12,627
  • 11
  • 51
  • 78
Léo Léopold Hertz 준영
  • 5,686
  • 12
  • 68
  • 115

3 Answers3

3

Nan means Not a Number

You operation produced an undefined result. bin2dec(s) returns the decimal representation of the binary number in s. But you passed a decimal number.

You probably wanted to use dec2bin()

A Dwarf
  • 18,981
  • 2
  • 44
  • 66
1

Those functions only work with integers.

Dennis Williamson
  • 106,229
  • 19
  • 167
  • 187
1

According to Octave's manual, you can open and read binary floating point data in VAX D and VAX G floating format, but 'Conversions are currently only supported for "ieee-be" and "ieee-le" formats.'

hanleyp
  • 6,617
  • 21
  • 22