% 信道增益在一定范围内分布,多个信道增益取平均值,看平均值的误差与信道个数之间的关系;
% 信道增益按这个公式取pathloss_dB=15.3+37.6*log10(mDistance);
% distance选10到50m;
% 注意pathloss是db数,变回实际数值,然后取平均,然后计算差值,计算差值与原信号的比例,
% 画出这个比例与信道数目之间的关系
% dB2ratio
% dB转换公式:ratio=exp(-dB/10)
% 正式程序
max_channel_count = 500;
min_distance = 100;
max_distance = 500;
x = 0;
figure;
plot(x, 0, 'r-', 'MarkerSize', 6);
title_string = '参数情况:最大信道个数:%d 距离范围:%d-%d';
parameters_info = sprintf(title_string, max_channel_count, min_distance, max_distance);
title(parameters_info);
% title(['信道数关系 ', '最大信道数:', max_channel_count, '距离范围:', min_distance, '——', max_distance]);
xlabel('信道个数');
ylabel('比例');
hold on
last_value = 0;
for channel_count = 1:max_channel_count
distances = RandNumbers(channel_count, min_distance, max_distance);
dB_gains = ChannelGain(distances);
normal_gains = dB2Ratio(dB_gains);
differences = abs(normal_gains - mean(normal_gains));
ratios = abs(differences ./ normal_gains);
plot([channel_count-1, channel_count], [last_value, mean(ratios)], 'r-', 'MarkerSize', 6);
last_value = mean(ratios);
drawnow;
end
没有合适的资源?快使用搜索试试~ 我知道了~
一个信道增益相关的小程序,Matlab仿真
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共5个文件
m:4个
license:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
需积分: 5 0 下载量 34 浏览量
2024-05-11
21:18:20
上传
评论
收藏 2KB ZIP 举报
温馨提示
matlab绘制函数图像 MATLAB (Matrix Laboratory) 是一种用于数值计算的高级编程语言和交互式环境,由 MathWorks 公司开发。它广泛用于算法开发、数据可视化、数据分析以及数值计算的高级技术计算语言和交互式环境。以下是一些 MATLAB 的基本特性和使用方式: 1. 基本语法 变量:MATLAB 中的变量不需要预先声明,直接赋值即可。 数组:MATLAB 使用方括号 [] 创建数组,数组索引从 1 开始。 运算符:包括加、减、乘、除、乘方等。 函数:MATLAB 有大量内置函数,也可以编写自定义函数。 2. 绘图 MATLAB 提供了丰富的绘图功能,如绘制线图、散点图、柱状图、饼图等。 matlab x = 0:0.01:2*pi; y = sin(x); plot(x, y); title('Sine Function'); xlabel('x'); ylabel('y'); 3. 数据分析 MATLAB 可以处理各种类型的数据,包括矩阵、向量、数组等,并提供了许多数据分析函数,如统计函数、信号处理函数等。 4. 脚本和函数
资源推荐
资源详情
资源评论
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/msword](https://img-home.csdnimg.cn/images/20210720083327.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 5 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/d7864c98224046ec9a7f43fa6207c84e_qq_51320133.jpg!1)
生瓜蛋子
- 粉丝: 3882
- 资源: 6141
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)