3

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

>> bin2dec ('10.1')
ans = NaN
Excellll
  • 12,847

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
  • 19,329
1

Those functions only work with integers.

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,625