Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

intmin - Smallest value of specified integer type

Syntax

v = intmin
v = intmin('classname')

Description

v = intmin is the smallest value that can be represented in the MATLAB software with a 32-bit integer. Any value smaller than the value returned by intmin saturates to the intmin value when cast to a 32-bit integer.

v = intmin('classname') is the smallest positive value in the integer class classname. Valid values for the string classname are

'int8'

'int16'

'int32'

'int64'

'uint8'

'uint16'

'uint32'

'uint64'

intmin('int32') is the same as intmin with no arguments.

Examples

Find the minimum value for a 64-bit signed integer:

v = intmin('int64')
v =
 -9223372036854775808

Convert this value to a 32-bit signed integer:

x = int32(v)
x =
  2147483647

Compare the result with the default value returned by intmin:

isequal(x, intmin)
ans =
     1

See Also

intmax, realmin, realmax, int8, uint8, isa, class

  


Recommended Products

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