Main Content

int

Get stored integer value of a fi object

Description

example

i = int(a) returns the integer value of a fi object, stored in one of the built-in integer data types.

Examples

collapse all

Create a fi object with default settings. Use the int function to get its stored integer value. The output is an int16 because the input used the default word length of 16-bits.

a = fi(pi);
b = int(a)
b = int16
    25736

Create a fi object that uses a 20-bit word length and get the stored integer value of the fi object.

a = fi(pi,1,20);
b = int(a)
b = int32
    411775

The output is an int32 to accommodate the larger input word length.

Input Arguments

collapse all

Fixed-point numeric object from which you want to get the stored integer value. The word length of the input determines the data type of the output.

Data Types: fi
Complex Number Support: Yes

Output Arguments

collapse all

Stored integer value of the input fi object, returned as one of the built-in integer data types. The word length of the input determines the data type of the output. The output has the same dimensions as the input.

Version History

Introduced in R2006a

See Also

Functions