seperable.m

来自「FIR filter design with unseperable windo」· M 代码 · 共 24 行

M
24
字号
clear 
close all
fs=10; %Sampling freq
%Creating 11x11 matrix with cosine of freq 0.3
n=0:1/fs:1; 
m=0:1/fs:1;
for i=1:length(n);
    for j=1:length(m);
        s(i,j)=cos(-2*pi*0.3*n(i)+2*pi*0.3*m(j));
    end 
end
x=s+randn(size(s)); %Adding white noise to the signal
X=fft2(x); %Fourier transform
Ptt=(abs(X)^2)/(11^2);
Rx=ifft2(Ptt);
win1=[0 0 0 0 1 1 1 0 0 0 0]
win2=win1';
w=win1*win2;
%figure, mesh(w)
Rx2=Rx*w;
Ptt2=fft2(Rx2,1024);
figure, contour(Ptt2,5), title('PSD Contour')
figure, mesh(fftshift(Ptt2)), title('PSD mesh')

⌨️ 快捷键说明

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