Calculating FIR filter coefficients with the windowing method using the Rectangular Window
7 次查看(过去 30 天)
显示 更早的评论
Please advice how to calculate FIR filter coefficients with windowing method using the Rectangular Window function and convolution method (using the Output Side Algorithm from Chapter 6)
0 个评论
回答(1 个)
Image Analyst
2015-3-27
Just create a 2D array of weights using whatever way you want. For example to get a Gaussian use fspecial():
kernel = fspecial('Gaussian', 15, 5)
outputImage = conv2(double(inputImage), kernel, 'same'); % Blur the image
2 个评论
Image Analyst
2015-3-29
conv() is for 1-D signals
window = ones(1, 9); % Whatever length you want
output = conv(signal, window, 'same');
Change the numbers in the window kernel to do various kinds of filters. If they're uniform, it's known as a moving average or box filter.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Statistics and Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!