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

📄 experiment6_1.m

📁 Simon Haykin的《Communication Systems》(《通信系统》)的配套MATLAB源代码。包括脉冲调制、随机过程、和差错编码等。
💻 M
字号:
% Experiment 6, CS: Haykin% Generating 127-chip PN sequences% polynomial1(x)  = x^7 + x+1% polynomial2(x) = x^7+x^6 + x^5 + x^4 + 1% Autocorrelation and cross correlation functions% requires functions pn_corr.m, PNseq.m, shift_register.m to run% polynomialspol1=[1 0 0  1 0 0 0 1];pol2=[1 1 1 1  0 0 0 1];% chip sizeN=127;% generating the PN sequencepnseq1 = PNseq(pol1);pnseq2 = PNseq(pol2);% mapping  antipodal signals (0-->-1,  1-->1)u=2*pnseq1-1;v=2*pnseq2-1;% autocorrelation of pnseq1[corrf]=pn_corr(u, u, N);% printsfigure(1)plot(-125:126,corrf(2:253)); axis([-126, 126,-10, 150])xlabel(' Delay \tau')ylabel(' Autocorrelation function R_{c}(\tau)')%autocorrelation of pnseq2[corrf]=pn_corr(v, v, N)% printsfigure(2)plot(-125:126,corrf(2:253)); axis([-126, 126,-10, 150])xlabel(' Delay \tau')ylabel(' Autocorrelation function R_{c}(\tau)')% cross correlation of pnseq1, pnseq2[c_corr]=pn_corr(u, v, N)% printsfigure(3)plot(-125:126,c_corr(2:253)); axis([-126, 126,-20, 20])xlabel(' Delay \tau')ylabel(' Cross-correlation function R_{ji}(\tau)')

⌨️ 快捷键说明

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