8-bit signed integer arrays
Variables in MATLAB® of data type (class) int8 are stored as
1-byte (8-bit) signed integers. For example:
y = int8(10);
whos yName Size Bytes Class Attributes y 1x1 1 int8
For more information on integer types, see Integers.
Some array creation functions allow you to specify the data type. For instance,
zeros(100,'int8') creates a 100-by-100 matrix of zeros of type
int8.
If you have an array of a different type, such as double or
single, then you can convert that array to an array of type
int8 by using the int8 function.