Created
March 15, 2017 11:49
-
-
Save FelipeCortez/379fecea99a5d75e0a9956000446d2c4 to your computer and use it in GitHub Desktop.
Filtering
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [] = pre1() | |
clf() | |
x = [1, zeros(1,99)] | |
y = filter([1], [1, 0.95], x) | |
plot2d3(y) | |
endfunction | |
function [] = pre2() | |
clf() | |
h = iir(10, 'lp', 'butt', 0.125, [0 0]) | |
B = coeff(h(2)) | |
B = B(11:-1:1) | |
A = coeff(h(3)) | |
A = A(11:-1:1) | |
[hzm, fr] = frmag(B, A, 512) | |
plot2d3(fr * 8000, abs(hzm)) | |
endfunction | |
function [] = pre3() | |
clf() | |
h = iir(10, 'lp', 'butt', 0.125, [0 0]) | |
B = coeff(h(2)) | |
B = B(11:-1:1) | |
A = coeff(h(3)) | |
A = A(11:-1:1) | |
[hzm, fr] = frmag(B, A, 512) | |
x = [1, zeros(1, 49)] | |
y = filter(B, A, x) | |
plot2d3(y) | |
endfunction | |
function [] = ex1() | |
t = [0:1/8000:8191/8000] | |
x = sin(2 * %pi * 100 * t + 2 * pi * 100 * (t .* t) | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment