Fixed-Point Toolbox Tutorial (Japanese) demo files

by

 

"Fixed-Point Toolbox Tutorial (Japanese)" demo files. 「Fixed-Point Toolbox チュートリアル」の例題ファイルです。

cal_numerictype.m
function T = cal_numerictype(x, sign, word_length)
% fiIuWFNg̃MOf[^œKXP[Ol߂֐
% ߂l̓oCiXP[OnumerictypeIuWFNg

% MOf[^iΒlj̍őľvZ
A = max(abs(double(minlog(x))), abs(double(maxlog(x))));

% MOf[^̍őlI[o[t[ŕ\”\ȐvZ
integer_length = ceil(log2(A));

% ̌vZ
fraction_length = word_length - integer_length - double(sign);

% numerictypeIuWFNg̍쐬
T = numerictype(sign, word_length, fraction_length);

Contact us