int8 conversion to one byte integer representationint16 conversion to 2 bytes integer representationint32 conversion to 4 bytes integer representationuint8 conversion to one byte unsigned integer representationuint16 conversion to 2 bytes unsigned integer representationuint32 conversion to 4 bytes unsigned integer representationCalling Sequencey = int8(X)
y = int16(X)
y = int32(X)
y = uint8(X)
y = uint16(X)
y = uint32(X)
ArgumentsXa matrix of floats or integers.ya matrix of integers coded on one, two or four bytes.Description
These functions convert and store data to one, two or four bytes integers. These
data types are especially useful to store big objects such as images,
long signals,...
y = int8(X)
return numbers in the range [-128, 127]y = uint8(X)
return numbers in the range [0, 255]y = int16(X)
return numbers in the range [-32768, 32767]y = uint16(X)
return numbers in the range [0, 65535]y = int32(X)
return numbers in the range [-2147483648, 2147483647]y = uint32(X)
return numbers in the range [0, 4294967295]
If X has numbers with a fractional part, Scilab rounds them
to the nearest integer toward zero.
ExamplesSee Also
double
inttype
iconvert