Demo entry 6661117

Matlab code

   

Submitted by anonymous on Nov 20, 2017 at 07:21
Language: Matlab. Code size: 336 Bytes.

function hd = ideal_lp(wc,M);
% Ideal LowPass filter computation
% --------------------------------
% [hd] = ideal_lp(wc,M)
%  hd = ideal impulse response between 0 to M-1
%  wc = cutoff frequency in radians
%   M = length of the ideal filter
%
alpha = (M-1)/2; n = [0:1:(M-1)];
m = n - alpha; fc = wc/pi; hd = fc*sinc(fc*m);

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).