Main Content

fixed.extractNumericType

入力からの数値型の抽出

R2021a 以降

説明

T = fixed.extractNumericType(x) は、数値入力 x から抽出されたか、または入力引数 x で指定された embedded.numerictype オブジェクトを返します。

すべて折りたたむ

数値型を入力数値から抽出します。

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

入力引数

すべて折りたたむ

入力。スカラーとして指定します。

次の入力型がサポートされます。

  • 数値 — halfsingledoubleint8int16int32int64uint8uint16uint32uint64logicalfi

  • 数値型指定オブジェクト — 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
複素数のサポート: あり

出力引数

すべて折りたたむ

入力の数値型。embedded.numerictype オブジェクトとして返されます。

バージョン履歴

R2021a で導入