このページの翻訳は最新ではありません。ここをクリックして、英語の最新版を参照してください。
fixed.aggregateType
集積 numerictype の計算
構文
aggNT = fixed.aggregateType(A,B)
説明
aggNT = fixed.aggregateType(A,B)
では、入力 A
および B
の全範囲と精度を表現できる、2 進小数点スケーリングされた最小の numerictype を計算します。
入力引数
|
整数、2 進小数点でスケーリングされた |
|
整数、2 進小数点でスケーリングされた |
出力引数
|
numerictype オブジェクト。 |
例
2 つの numerictype オブジェクトの集積 numerictype の計算。
% can represent range [-4,4) and precision 2^-13 a_nt = numerictype(1,16,13); % can represent range [-2,2) and precision 2^-16 b_nt = numerictype(1,18,16); % can represent range [-4,4) and precision 2^-16 aggNT = fixed.aggregateType(a_nt,b_nt) aggNT = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 19 FractionLength: 16
2 つの fi
オブジェクトの集積 numerictype の計算。
% Unsigned, WordLength: 16, FractionLength: 14 a_fi = ufi(pi,16); % Signed, WordLength: 24, FractionLength: 21 b_fi = sfi(-pi,24); % 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
fi
オブジェクトと整数の集積 numerictype の計算。
% Unsigned, WordLength: 16, FractionLength: 14 % can represent range [0,3] and precision 2^-14 a_fi = ufi(pi,16); % Unsigned, WordLength: 8, FractionLength: 0 % can represent range [0,255] and precision 2^0 cInt = uint8(0); % Unsigned with WordLength: 14+8, FractionLength: 14 % can represent range [0,255] and precision 2^-14 aggNT = fixed.aggregateType(a_fi,cInt) aggNT = DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 22 FractionLength: 14
バージョン履歴
R2011b で導入