www.m

来自「ofdm ifft/fft仿真」· M 代码 · 共 35 行

M
35
字号
clear
fd=100;
impw=jakes_filter(fd);
fs=16*fd;ts=1/fs;
time=[1*ts:ts:128*ts];
figure(1)
subplot(2,1,1)
stem(time,impw,'*');grid;('impulse response')
[h,f]=linear_fft(impw,128,ts);
subplot(2,1,2)
plot(f,abs(h.*h));grid;
xlabel('frequence');ylabel('PSD')
%输入为高斯白噪声,求滤波器输出的功率谱密度
x=randn(1,1024);
y=filter(impw,1,x);
[output_psd ff]=log_psd(y,1024,ts);
figure(2)
subplot(2,1,1)
plot(ff,output_psd);grid
axis([-500 500 -50 0])
xlabel('frequence');ylabel('PSD')
%输入为复高斯白噪声,球滤波器输出的包络
z=randn(1,1024)+i*randn(1,1024);
zz=filter(impw,1,z);
time=(0:ts:1024*ts);
%归一化输出
zz=zz/max(max(abs(zz)));
subplot(2,1,2)
plot(time(161:480),10*log10(abs(zz(161:480))));grid
axis([0.1 0.3 -20 0])
%程序结束



⌨️ 快捷键说明

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