欢迎来到天天文库
浏览记录
ID:59184054
大小:14.50 KB
页数:2页
时间:2020-09-10
《数字基带信号功率谱MATLAB仿真程序代码.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、clearall;closeall;Ts=1;N_sample=8;dt=Ts/N_sample;N=1000;t=0:dt:(N*N_sample-1)*dt;T=t(end);gt1=ones(1,N_sample);gt2=ones(1,N_sample/2);gt2=[gt2zeros(1,N_sample/2)];mt3=sinc((t-5)/Ts);gt3=mt3(1:10*N_sample);d=(sign(randn(1,N))+1)/2;data=sigexpand(d,N_sample);st1=co
2、nv(data,gt1);st2=conv(data,gt2);d=2*d-1;data=sigexpand(d,N_sample);st3=conv(data,gt3);[f,st1f]=T2F(t,[st1(1:length(t))]);[f,st2f]=T2F(t,[st2(1:length(t))]);[f,st3f]=T2F(t,[st3(1:length(t))]);figure(1)subplot(321)plot(t,[st1(1:length(t))]);grid;axis([020-1.51.5]);
3、ylabel('单极性NRZ波形');subplot(322)plot(f,10*log10(abs(st1f).^2/T));grid;axis([-55-4010]);ylabel('单极性NRZ攻略谱密度');subplot(323)plot(t,[st2(1:length(t))]);grid;axis([020-1.51.5]);ylabel('单极性RZ波形');subplot(324)plot(f,10*log10(abs(st2f).^2/T));axis([-55-4010]);ylabel('单极性R
4、Z功率谱密度(dB/Hz)');subplot(325)plot(t-5,[st3(1:length(t))]);grid;axis([020-22]);ylabel('双极性sinc波形');subplot(326)plot(f,10*log10(abs(st3f).^2/T));grid;axis([-55-4010]);ylabel('sinc波形功率谱密度');xlabel('f*Ts');
此文档下载收益归作者所有