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

📄 ip_02_04.m

📁 经典通信系统仿真书籍《通信系统与 MATLAB (Proakis)》源代码
💻 M
字号:
% MATLAB script for Illustrative Problem 4, Chapter 2.
echo on
N=1000;
M=50;
Rx_av=zeros(1,M+1);
Sx_av=zeros(1,M+1);
for j=1:10,		    		% take the ensemble average over 10 realizations
   X=rand(1,N)-1/2;	      		% N i.i.d. uniformly distributed random variables
			      		% between -1/2 and 1/2
   Rx=Rx_est(X,M); 	      		% Autocorrelation of the realization
   Sx=fftshift(abs(fft(Rx))); 		% Power spectrum of the realization
   Rx_av=Rx_av+Rx;	      		% sum of the autocorrelations
   Sx_av=Sx_av+Sx;	      		% sum of the spectrums
end;
Rx_av=Rx_av/10;	              		% ensemble average autocorrelation
Sx_av=Sx_av/10;		      		% ensemble average spectrum
% Plotting comments follow

⌨️ 快捷键说明

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