The matlab source code for book of "digital communications"

源代码在线查看: ip_06_05.m

软件大小: 76 K
上传用户: shenshen00
关键词: communications digital matlab source
下载地址: 免注册下载 普通下载 VIP

相关代码

				% MATLAB script for Illustrative Problem 5, Chapter 6.
				echo on
				p=0.99;
				N=1000;
				d=5;
				% The filter is described by the vectors A and B below...
				A=[1 -2*p p^2];
				B=(1-p)^2;
				for i=1:N,
				   [white_noise_seq1(i) white_noise_seq2(i)] = gngauss;
				end;
				b1=filter(B,A,white_noise_seq1);
				b2=filter(B,A,white_noise_seq2);
				c=b1(d+1:N)+b2(1:N-d);
				% The case where p=0.9 follows...
				p=0.9;
				A=[1 -2*p p^2];
				B=(1-p)^2;
				for i=1:N,
				   [white_noise_seq1(i) white_noise_seq2(i)] = gngauss;
				end;
				new_b1=filter(B,A,white_noise_seq1);
				new_b2=filter(B,A,white_noise_seq2);
				new_c=new_b1(d+1:N)+new_b2(1:N-d);
				% plotting commands follow			

相关资源