Fixed-Point Toolbox Tutorial (Japanese) demo files

by

 

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

eml_myeg.m
% ͈Tvf[^쐬pXNvg

% fiprefݒ̃Zbg
reset(fipref)

% ́EtB^Wf[^̒`
myfilter_data

% AL[^numerictypeݒ
Tacc = numerictype(true, 32, 30);

% fimathݒ
F = fimath('OverflowMode',          'saturate', ...
		   'RoundMode',             'floor', ...
		   'SumMode',               'SpecifyPrecision', ...
           'SumWordLength',         Tacc.WordLength, ...
           'SumFractionLength',     Tacc.FractionLength, ...
           'ProductMode',           'SpecifyPrecision', ...
           'ProductWordLength',     Tacc.WordLength, ...
           'ProductFractionLength', Tacc.FractionLength);

% ͐MtB^WfiIuWFNg쐬
% numerictypeݒ	F LA꒷16rbgA15rbgiX[v2^-15j
% fimathݒ		F AL[^ɍ킹ݒ
u_fi   = fi(u, true, 16, 15, F);
num_fi = fi(num, true, 16, 15, F);
den_fi = fi(den, true, 16, 15, F);

% ͈Tvf[^̍쐬
myeg = {num_fi, den_fi, u_fi, true};

Contact us