Last active
March 29, 2016 03:02
-
-
Save arthurafarias/7dcd0ed209df5673e09a to your computer and use it in GitHub Desktop.
UFCG - EE - LPC - P03 Q01
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
h = @(n,wc,ws) 2*wc/ws*sinc(n*2*wc/ws); % impulse response of a lowpass filter in discrete domain, ws sampling angular frequency, wc cutoff frequency | |
h_causal = @(n,wc,ws,N) h(n-(N-1)/2,wc,ws); % causal version of impulse response | |
N = 33; % given in question | |
wc = 2*pi*500; % given in question | |
ws = 2*pi*8000; % given in question | |
i = 0:(N-1); % indexer, vector length is N-1. | |
bi = h_causal(i,wc,ws,length(i)); % FIR gains |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to run this gist on matlab just copy and paste following code into matlab console.
eval(urlread('https://gist.githubusercontent.com/arthurafarias/7dcd0ed209df5673e09a/raw/e3607c4f7d2bf2362ff3f1f40ff6e5784ae326aa/ufcg-ee-lpc-p03q01.m'));