dB の定義はパワー比の対数の10倍です。
振幅の場合は2乗する必要があります。
Fs = 20000; % Sampling Frequency
Fstop = 65; % Stopband Frequency
Fpass = 100; % Passband Frequency
Astop = 40; % Stopband Attenuation (dB)
Apass = 1; % Passband Ripple (dB)
match = 'passband'; % Band to match exactly
h = fdesign.highpass(Fstop, Fpass, Astop, Apass, Fs);
Hd = design(h, 'cheby1', 'MatchExactly', match);
t=0:0.00005:1;
freq2=75;
signal2=sin(2*pi*freq2*t);
ux=signal2;
yf5=filter(Hd,ux);
plot(t,ux,t,yf5)
ylim([-0.1,0.1])
ylabel('amplitude')
xlabel('t [s]')
legend('Raw Data','Filtered Data(butter,12dim)')
figure
plot(t,mag2db(ux),t,mag2db(yf5)) % mag2db(x) = 20*log10(x)
ylim([-50 0])



