# int16 (Matlab function)

Convert to 16-bit signed integer

## Matlab/Scilab equivalent

Matlab | Scilab

    int16

    int16

## Particular cases

For infinite and NaNs values, Scilab and Matlab int16 return different values.

## Examples

Matlab | Scilab

    A = int16(inf)
    A = 32767
    A = int16(-inf)
    A = -32768
    A = int16(nan)
    A = 0

    A = int16(%inf)
    A = -32768
    A = int16(-%inf)
    A = -32768
    A = int16(%nan)
    A = -32768