Fixed-Point Toolbox Tutorial (Japanese) demo files

by

 

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

run_eml_myfilter_fi.m
% M-t@CEmbedded MATLAB MEX-t@C̎sʁEsԔrpXNvg

% óEAL[^numerictypeݒ
Ty   = numerictype(1, 16, 15);
Tacc = numerictype(1, 32, 30);

% óEAL[^̏
y_fi    = fi(zeros(size(u_fi)), Ty, fimath(u_fi));
acc_fi  = fi(0, Tacc, fimath(u_fi));
y_fi2   = fi(zeros(size(u_fi)), Ty, fimath(u_fi));
acc_fi2 = fi(0, Tacc, fimath(u_fi));

% M-t@CsԂ̌v
tic
for n = 1:100
	[y_fi, acc_fi]= eml_myfilter_fi(num_fi, den_fi, u_fi, true);
end
t1 = toc;

% Embedded MATLAB MEX-t@CsԂ̌v
tic
for n = 1:100
	[y_fi2, acc_fi2]= eml_myfilter_fi2(num_fi, den_fi, u_fi, true);
end
t2 = toc;

% sԂ̕\
disp(['M-t@Cs                  F', num2str(t1), 'b'])
disp(['Embedded MATLAB MEX-t@CsԁF', num2str(t2), 'b'])

% sʂ̕\
plot_eml_myfilter(f, u, H, y_fi, y_fi2)

Contact us