1、理想低通滤波器Matlab程序M=256;N=256;d0=50;m=fix(M/2);n=fix(N/2);%h=zeros(256,256);fori=1:Mforj=1:Nd=sqrt((i-m)^2+(j-n)^2);if(d=d0)h(i,j)=1;elseh(i,j)=0;endendendmesh(h)2、巴特沃斯低通滤波器Matlab程序clc;clear;M=256;N=256;d0=50;n=2;m=fix(M/2);n=fix(N/2);%h=zeros(256,256);fori=1:Mforj=1:Nd=sqrt((i-m)^2+(j-n)^2);h(i,j)=1/(1+0.414*(d/d0)^(2*2));endendmesh(h)axisoff2、高斯低通滤波器Matlab程序clc;clear;M=256;N=256;d0=50;m=fix(M/2);n=fix(N/2);%h=zeros(256,256);fori=1:Mforj=1:Nd=sqrt((i-m)^2+(j-n)^2);h(i,j)=exp(-(d^2)/(2*(d0^2)));endendmesh(h)axisoff