octave-maintainers
[Top][All Lists]
Advanced

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

Help with uint8()


From: Rik
Subject: Help with uint8()
Date: Fri, 9 Mar 2018 09:44:06 -0800

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

Thanks,
Rik




reply via email to

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