⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lp2filt.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 M
字号:
 
% This is a demo program
% The design of 2-D lowpass filter is based
% on the 1-D lowpass filter a (coefficients)
% F1 is the result of Choi
% F is the result of mine

function A = lp2filt(x)

y = [0.0751,0.1239,0.2042,0.1239,0.0751];
B = zeros(33);
B(17,15:19) = y;
B(15:19,17) = y';
B(17,17) = 2*B(17,17);
F1 = fftshift(fft2(B));
subplot(2,2,1)
mesh(abs(F1)./abs(F1(17,17)))

A = zeros(33);
start = 17-(size(x,2)+1)/2+1;
A(17,start:start+size(x,2)-1) = x;
A(start:start+size(x,2)-1,17) = x';
A(17,17) = A(17,17)*2;

F = fftshift(fft2(A));
subplot(2,2,2)
mesh(abs(F)./abs(F(17,17)))
title('2-D Lowpass Filter');

subplot(2,2,3)
contour(abs(F1)./abs(F1(17,17)),20)
subplot(2,2,4)
contour(abs(F)./abs(F(17,17)),20)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -