fixed.extractNumericType
Description
Examples
Extract the numeric type from an input numeric value.
T = fixed.extractNumericType(pi)
T =
DataTypeMode: DoubleT = fixed.extractNumericType(int8(0))
T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 0T = fixed.extractNumericType(fi(pi,1,24,12))
T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 24
FractionLength: 12T = fixed.extractNumericType(half(pi))
T =
DataTypeMode: HalfExtract the numeric type from a numeric type specification object.
T = fixed.extractNumericType(numerictype(1,32,16))
T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 32
FractionLength: 16T = fixed.extractNumericType(fixdt(0,18,0))
T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 18
FractionLength: 0Extract the numeric type from a data type name string.
T = fixed.extractNumericType('int8')T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 0T = fixed.extractNumericType('sfix16_En3')T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 3Extract the numeric type from a constructor string.
T = fixed.extractNumericType('numerictype(1,33,55)')T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 33
FractionLength: 55T = fixed.extractNumericType('fixdt(0,77,22)')T =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 77
FractionLength: 22Input Arguments
Input, specified as a scalar.
The following input types are supported:
Numeric values —
half,single,double,int8,int16,int32,int64,uint8,uint16,uint32,uint64,logical,fiNumeric type specification objects —
embedded.numerictypeobjects,Simulink.NumericTypeobjectsMATLAB® data type name strings —
'half','single','double','int8','int16','int32','int64','uint8','uint16','uint32','uint64','logical'Simulink® data type name strings (not aliases) —
'bool','sfix16_En3', etc.Constructor strings that evaluate to a numeric type object —
'numerictype(1,33,55)','fixdt(0,77,22)', etc.
Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical | fi
Complex Number Support: Yes
Output Arguments
Numeric type of the input, returned as a embedded.numerictype
object.
Version History
Introduced in R2021a
See Also
fi | fixdt | numerictype | Simulink.NumericType | Fixed-Point Numbers in Simulink
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)