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

📄 rayleigh.m

📁 matlab编程环境下独自编的rayleigh信道的程序
💻 M
字号:
function output=rayleigh(input)

nsamp=length(input);
Ts=1e-2;
fd=200;
no=6;
counter=1000;
flat=1;  
    ac0 = sqrt(1.0 ./ (2.0.*(no + 1)));   
    as0 = sqrt(1.0 ./ (2.0.*no));         
    ic0 = counter;                        
    wm = 2.0.*pi.*fd;
    n = 4.*no + 2;
    wmts = wm.*Ts;
    pino = pi./no;                        

    xc=zeros(1,nsamp);
    xs=zeros(1,nsamp);
    ic=[1:nsamp]+ic0;

  for nn = 1: no
	  cwn = cos( cos(2.0.*pi.*nn./n).*ic.*wmts );
	  xc = xc + cos(pino.*nn).*cwn;
	  xs = xs + sin(pino.*nn).*cwn;
  end

  cwmt = sqrt(2.0).*cos(ic.*wmts);
  xc = (2.0.*xc + cwmt).*ac0;
  xs = 2.0.*xs.*as0;
  output = sqrt(xc.^2+xs.^2).*input(1:nsamp);   

⌨️ 快捷键说明

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