| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
v = intmax
v = intmax('classname')
v = intmax is the largest positive value that can be represented in the MATLAB software with a 32-bit integer. Any value larger than the value returned by intmax saturates to the intmax value when cast to a 32-bit integer.
v = intmax('classname') is the largest positive value in the integer class classname. Valid values for the string classname are
'int8' | 'int16' | 'int32' | 'int64' |
'uint8' | 'uint16' | 'uint32' | 'uint64' |
intmax('int32') is the same as intmax with no arguments.
Find the maximum value for a 64-bit signed integer:
v = intmax('int64')
v =
9223372036854775807Convert this value to a 32-bit signed integer:
x = int32(v) x = 2147483647
Compare the result with the default value returned by intmax:
isequal(x, intmax)
ans =
1intmin, realmax, realmin, int8, uint8, isa, class
![]() | intersect | intmin | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |