Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.2 - Русский

Change language to:
English - Français - 日本語 - Português -

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Справка Scilab >> Функции для совместимости > mtlb_uint16

mtlb_uint16

Matlab uint16 emulation function

Description

Matlab and Scilab uint16 behave differently :

  • Beyong the main interval bounds, Scilab's uint16() wraps, while Matlab's mtlb_uint16() saturates.
  • For non integer values, Scilab's uint16() truncates the fractional part, while Matlab's mtlb_uint16() rounds to the nearest integer.

xuint16(x)mtlb_uint16(x)
%nan00
-%inf00
-2655340
-1655350
000
222
10.21010
10.51011
10.511011
.........
655356553565535
65536065535
65537165535
%inf6553565535

mtlb_uint16 has not to be used for hand coded functions.

The function mtlb_uint16(A) is used by mfile2sci to replace uint16(A) when it is not possible to know what is the input while porting Matlab code to Scilab. This function then determines the correct semantic at run time.

Report an issue
<< mtlb_true Функции для совместимости mtlb_uint32 >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Feb 14 15:05:27 CET 2019