storedInteger
Get stored integer value of fi object
Syntax
Description
returns the stored integer value of y = storedInteger(a)fi object a. The
stored integer y is returned as one of the built-in integer data
types.
The real-world value of a fi object can be represented as
When the bias is zero and the slope is a power of two, commonly called binary-point scaling, this is often represented as
Examples
Input Arguments
Output Arguments
Limitations
Integers greater than 64 bits are not supported by the
storedIntegerfunction. ThestoredIntegerfunction errors when the data type of the output has 65 or more bits. For example,storedInteger(fi(1,0,65,0))
Integers greater than 64 bits are not supported in the 'storedInteger' function. For exact integer representation for any word length, use BIN, OCT, DEC, or HEX. To convert a stored integer value to double for any word length, use storedIntegerToDouble.
Tips
Alternative Functionality
Function
The int and
storedInteger functions both return the stored integer value of a
fi object. You can use the int function to both
get and set the stored integer of a fi
object:
a = fi(pi);
y = int(a) %gety = int16 25736
a = fi(pi); a.int = 3; %set y = a.int %get
y = int16 3
storedInteger function only to get
the stored integer value of a fi
object.a = fi(pi); y = storedInteger(a)
y = int16 25736
storedInteger function cannot be used to
set the stored integer value of a fi object.Extended Capabilities
Version History
Introduced in R2012a