Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
% GNU Octave file (may also work with MATLAB(R) )
Fs=44100;minF=10;maxF=Fs/2;
sweepF=logspace(log10(minF),log10(maxF),200);
preemph_coeff = 1
b0 = 1 * preemph_coeff
b1 = -1.700724000000000e+00 * preemph_coeff + (1 - preemph_coeff)
b2 = 7.029381524255900e-01 * preemph_coeff
a0 = 2.380612232632074e-01 * preemph_coeff + (1 - preemph_coeff)
a1 = -1.718545401961680e-01 * preemph_coeff
a2 = -4.429177968575995e-02 * preemph_coeff
[h,w]=freqz([b0, b1, b2],[a0, a1, a2],sweepF,Fs);
semilogx(w,20*log10(h))
grid on
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.