fixed.aggregateType
Compute aggregate numerictype
Description
Examples
Compute Aggregate Numeric Type
Aggregate Numeric Type of Two numerictype
Objects
a_nt = numerictype(1,16,13); b_nt = numerictype(1,18,16); aggNT = fixed.aggregateType(a_nt,b_nt)
aggNT = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 19 FractionLength: 16
a_nt
can represent the range [-4,4)
with precision 2^-13
. b_nt
can represent the range [-2,2)
with precision 2^-16
. aggNT
can represent the range [-4,4)
with precision 2^-16
.
Aggregate Numeric Type of Two fi
Objects
a_fi = ufi(pi,16)
a_fi = 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 16 FractionLength: 14
b_fi = sfi(-pi,24)
b_fi = -3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 24 FractionLength: 21
aggNT = fixed.aggregateType(a_fi,b_fi)
aggNT = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 24 FractionLength: 21
Aggregate Numeric Type of a fi
Object and an Integer
a_fi = ufi(pi,16); cInt = uint8(0); aggNT = fixed.aggregateType(a_fi,cInt)
aggNT = DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 22 FractionLength: 14
a_fi
can represent the range [0,3]
with precision 2^-14
. cInt
can represent the range [0,255]
with precision 2^0
. aggNT
can represent the range [0,255]
with precision 2^-14
.
Input Arguments
A,B
— Input objects
integers | numerictype
objects | fi
objects
Input objects, specified as integers, binary point scaled fixed-point
fi
objects, or numerictype
objects.
Output Arguments
aggNT
— Aggregate numeric type
numerictype
object
Aggregate numeric type, returned as a numerictype
object.
Version History
Introduced in R2011b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)