Fixed-Point Toolbox Tutorial (Japanese) demo files

by

 

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

myfilter_data.m
% myfilterpf[^`t@C

% fBW^tB^W
% ۂɂden(1)myfilterł͎gpȂ
num = [0.29290771484375 0.585784912109375 0.292907714843750];
den = [1 - 2^-15		0				  0.171600341796875];

% ͐M̍쐬
% ͐M1bԂŎg 0`Fn [Hz] ɕω`[vM
Fs = 256;										% Tvgi[Hz]j
Fn = Fs / 2;									% iCLXggi[Hz]j
Ts = 1 / Fs;									% Tvԁi[sec]j
t = 0:Ts:1 - Ts;								% ԃxNgi0`1 [sec]j
gain = 1 - 2^-15;								% ͐MQC
u = gain * sin(pi * Fn * t.^2);					% ͐M

% tB^W̎Zo
n = length(u);									% ͐M̗vf
f = linspace(0, 1, n);							% gf[^
H = abs(fft(num, 2 * n) ./ fft(den, 2 * n));	% tB^W
H = H(1:n);										% tB^W̐܂Ԃ̏

% svȕϐ̍폜
clear n t Fs

Contact us