Largest value of specific integer type
Return the largest value of the 32-bit signed integer type.
v = intmax
v = int32 2147483647
Return the largest value of the 64-bit unsigned integer type.
v = intmax('uint64')
v = uint64 18446744073709551615
Check the class of
ans = 'uint64'
Return the largest value of the 8-bit signed integer type, which is 127.
v = intmax('int8')
v = int8 127
Convert a value larger than 127 to 8-bit signed integer.
v1 = int8(198)
v1 = int8 127
The converted value becomes 127.
v1 is the same as
ans = logical 1
type— Integer type
'int32'(default) | character vector | string
Integer type, specified as a character vector or string. This table shows the valid
8-bit signed integer
16-bit signed integer
32-bit signed integer
64-bit signed integer
8-bit unsigned integer
16-bit unsigned integer
32-bit unsigned integer
64-bit unsigned integer
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.