64-bit signed integer arrays
Variables in MATLAB® of data type (class)
int64 are stored as
8-byte (64-bit) signed integers. For example:
y = int64(10); whos y
Name Size Bytes Class Attributes y 1x1 8 int64
For more information on integer types, see Integers.
Some array creation functions allow you to specify the data type. For instance,
zeros(100,'int64') creates a 100-by-100 matrix of zeros of type
If you have an array of a different type, such as
single, then you can convert that array to an array of type
int64 by using the
X— Input array
Input array, specified as a scalar, vector, matrix, or multidimensional array.
Convert a double-precision variable to a 64-bit signed integer.
x = 100; xtype = class(x)
xtype = 'double'
y = int64(x)
y = int64 100
This function fully supports tall arrays. For more information, see Tall Arrays.
backgroundPoolor accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
This function fully supports GPU arrays. For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see Run MATLAB Functions with Distributed Arrays (Parallel Computing Toolbox).