octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

an error in the page at <http://www.gnu.org/software/octave/doc/interpre


From: Abe
Subject: an error in the page at <http://www.gnu.org/software/octave/doc/interpreter/Built_002din-Data-Types.html>
Date: Fri, 19 Oct 2012 01:52:21 -0500

Quoting 
<http://www.gnu.org/software/octave/doc/interpreter/Built_002din-Data-Types.html>:

  An example of the use of typecast on a little-endian machine is

          x = uint16 ([1, 65535]);
          typecast (x, 'uint8')
          ⇒ [   0,   1, 255, 255]


That`s actually big-endian.  Here`s little-endian output:

  octave-3.4.0:20> v = uint16 ([1, 65535]);
  octave-3.4.0:22> typecast (v, 'uint8')
  ans =

    1    0  255  255


— Abe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]