资源简介
该代码是瑞利衰落信道的仿真代码,使用matlab编写而成,可运行
代码片段和文件信息
%m.m
clc;
LengthOfSignal=20140; %信号长度(最好大于两倍fc)
fm=5000; %最大多普勒频移
fc=5120; %载波频率
t=1:LengthOfSignal; % SignalInput=sin(t/100);
s=640*pi;
i=0:1:LengthOfSignal-1;
t=i/LengthOfSignal;
t1=(t-1/8).^2;t3=(t-3/8).^2;t4=(t-4/8).^2;
t6=(t-6/8).^2;t7=(t-7/8).^2;
xm=exp(-s*t1)+exp(-s*t3)+exp(-s*t4)+exp(-s*t6)+exp(-s*t7);
c=cos(2*pi*fc*t);
SignalInput=xm.*c;%双边带信号输入
delay=[0 31 71 109 173 251];
power=[0 -1 -9 -10 -15 -20]; %dB
y_in=[zeros(1delay(6)) SignalInput]; %为时移补零
y_out=zeros(1LengthOfSignal); %用于信号输出
for i=1:6
R; y_out=y_out+r.*y_in(delay(6)+1-delay(i):delay(6)+LengthOfSignal-delay(i))*10^(power(i)/20);
end;
am=y_out.*c; %信号解调
wp=0.1*pi;ws=0.12*pi;Rp=1;As=10; %设置滤波器
[Nwn]=buttord(wp/piws/piRpAs);
[ba]=butter(Nwn);
m1=filter(baam);
m1=2*m1;
figure(1);
subplot(311);
plot(xm(delay(6)+1:LengthOfSignal)); %去除时延造成的空白信号
title(‘调制信号‘);
subplot(312);
plot(SignalInput(delay(6)+1:LengthOfSignal));
title(‘信号输入‘);
subplot(313);
plot(y_out(delay(6)+1:LengthOfSignal));
title(‘信号输出‘);
figure(2);
subplot(211);
plot(am(delay(6)+1:LengthOfSignal));
title(‘解调信号‘);
subplot(212);
plot(m1(delay(6)+1:LengthOfSignal));
title(‘低通滤波器‘);
figure(3);
subplot(211);
hist(r256);
title(‘Amplitude Distribution Of Rayleigh Signal‘)
subplot(212);
hist(angle(r0));
title(‘Angle Distribution Of Rayleigh Signal‘);
figure(4);
plot(Sf1);
title(‘The Frequency Response of Doppler Filter‘);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1545 2012-12-25 09:16 m.m
文件 462 2012-12-25 09:16 R.m
相关资源
- WSN中leach分簇路由代码MATLAB
- 经典SAX符号化算法
- Matlab——离散点的随机区域分配
- 基于matlab的Iris、乳腺癌数据集的模式
- 小波图像增强matlab源代码
- 求两幅图像的互信息熵
- 目标检测matlab代码
- 复杂网络中常用的ER网络、BA网络、
- opencv 类似matlab 绘图
- 经典的二阶等效电路模考虑到温度的
- 前馈神经网络 Matlab 实现
- 四面体插值MATLAB 函数
- 用MATLAB实现ofdm的ls估计算法
- 用matlab给图像分块并保存子图源码
- 模糊聚类MATLAB程序88422
- 线性预测编码 Matlab
- 均匀量化matlab
- GM(1n) matlab代码
- 最速梯度下降法,matlab程序详细注解
- 免疫遗传算法,matlab
- 灰度图象的jpeg压缩 matlab
- Matlab应用微分方程求解脉冲响应曲线
- asm MATLAB程序
- QPSK通信系统的蒙特卡洛Monte-Carlo仿真
- 十折交叉验证SVM分类器Matlab代码
- matlab的canny边缘检测
- 分段线性插值matlab程序
- SQP/序列二次规划完整matlab代码
- 消息传递算法mp的matlab代码
- 可直接运行的随机森林的matlab代码
评论
共有 条评论