MATLAB生成瑞丽衰落信道PDF并绘制图像
clear all; close all; clc;
% 信号频率 fc = 2.4e9;
% 信号波长 lambda = physconst('LightSpeed')/fc;
% 发射天线与接收天线之间的距离 d = 10*lambda;
% 发射天线与接收天线之间的相对方向 theta = pi/4;
% 相位偏移 phi = 0;
% 相位差 delta_phase = 2pid/lambda*cos(theta)+phi;
% K因子 K = 0.5;
% 生成瑞丽衰落信道 N = 1e6; s = (randn(1,N)+1i*randn(1,N))/sqrt(2); h = sqrt(K/(K+1))exp(1idelta_phase) + sqrt(1/(K+1))*s;
% 计算瑞丽衰落信道PDF bins = 100; pdf = hist(abs(h),bins)/N;
% 绘制PDF图像 figure(1); bar(linspace(0,max(abs(h)),bins),pdf); xlabel('Amplitude'); ylabel('Probability'); title('Rician Fading Channel PDF');
原文地址: https://www.cveoy.top/t/topic/mMcj 著作权归作者所有。请勿转载和采集!