octave-maintainers
[Top][All Lists]
Advanced

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

Re: Help with uint8()


From: PhilipNienhuis
Subject: Re: Help with uint8()
Date: Fri, 9 Mar 2018 12:01:56 -0700 (MST)

Rik-4 wrote
> Could someone with Matlab try the following code snippet?
> 
> uint8 ([-Inf, -1, 300, Inf, NaN])
> 
> The documentation says that values outside the range are mapped to the
> nearest endpoint.  But does NaN map to 0 or 255?
> 
> In Octave the result is
> 
> ans =
> 
>     0    0  255  255    0

>> uint8 ([-Inf, -1, 300, Inf, NaN])

ans =

  1×5 uint8 row vector

     0     0   255   255     0

Matlab r2018a prerelease



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html



reply via email to

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