fixed.extractNumericType
説明
例
数値型の抽出
数値型を入力数値から抽出します。
T = fixed.extractNumericType(pi)
T = DataTypeMode: Double
T = fixed.extractNumericType(int8(0))
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 8 FractionLength: 0
T = fixed.extractNumericType(fi(pi,1,24,12))
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 24 FractionLength: 12
T = fixed.extractNumericType(half(pi))
T = DataTypeMode: Half
数値型を数値型指定オブジェクトから抽出します。
T = fixed.extractNumericType(numerictype(1,32,16))
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 32 FractionLength: 16
T = fixed.extractNumericType(fixdt(0,18,0))
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 18 FractionLength: 0
数値型をデータ型名の string から抽出します。
T = fixed.extractNumericType('int8')
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 8 FractionLength: 0
T = fixed.extractNumericType('sfix16_En3')
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 3
数値型をコンストラクターの string から抽出します。
T = fixed.extractNumericType('numerictype(1,33,55)')
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 33 FractionLength: 55
T = fixed.extractNumericType('fixdt(0,77,22)')
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 77 FractionLength: 22
入力引数
x
— 入力
スカラー
入力。スカラーとして指定します。
次の入力型がサポートされます。
数値 —
half
、single
、double
、int8
、int16
、int32
、int64
、uint8
、uint16
、uint32
、uint64
、logical
、fi
数値型指定オブジェクト —
embedded.numerictype
オブジェクト、Simulink.NumericType
オブジェクトMATLAB® データ型名の string —
'half'
、'single'
、'double'
、'int8'
、'int16'
、'int32'
、'int64'
、'uint8'
、'uint16'
、'uint32'
、'uint64'
、'logical'
Simulink® データ型名の string (エイリアスではない) —
'bool'
、'sfix16_En3'
など数値型オブジェクトとして評価されるコンストラクターの string —
'numerictype(1,33,55)'
、'fixdt(0,77,22)'
など
データ型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
| fi
複素数のサポート: あり
出力引数
T
— 入力の数値型
embedded.numerictype
オブジェクト
入力の数値型。embedded.numerictype
オブジェクトとして返されます。
バージョン履歴
R2021a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)