Main Content

isslopebiasscaled

numerictype オブジェクトの勾配とバイアスのスケーリングが自明でないかどうかを判別

説明

tf = isslopebiasscaled(T)numerictype T の勾配とバイアスのスケーリングが自明でない場合に 1 (true) を返します。それ以外の場合は 0 (false) を返します。勾配が 2 の整数の累乗で、バイアスが 0 の場合、勾配とバイアス スケーリングは自明です。

すべて折りたたむ

numerictype オブジェクトを作成し、その勾配とバイアスのスケーリングが自明でないかどうかを判別します。

T1 = numerictype
T1 =


          DataTypeMode: Fixed-point: binary point scaling
            Signedness: Signed
            WordLength: 16
        FractionLength: 15
tf = isslopebiasscaled(T1)
tf = logical
   0

T2 = numerictype('DataTypeMode',...
    'Fixed-point: slope and bias scaling',...
    'WordLength',32,...
    'Slope',2^-2,...
    'Bias',4)
T2 =


          DataTypeMode: Fixed-point: slope and bias scaling
            Signedness: Signed
            WordLength: 32
                 Slope: 0.25
                  Bias: 4
tf = isslopebiasscaled(T2)
tf = logical
   1

T3 = numerictype('DataTypeMode',...
    'Fixed-point: slope and bias scaling',...
    'WordLength',32,...
    'Slope',2^2,...
    'Bias',0)
T3 =


          DataTypeMode: Fixed-point: slope and bias scaling
            Signedness: Signed
            WordLength: 32
                 Slope: 2^2
                  Bias: 0
tf = isslopebiasscaled(T3)
tf = logical
   0

入力引数

すべて折りたたむ

入力 numerictype オブジェクト。スカラーとして指定します。

バージョン履歴

R2008a で導入