i am referring to a book titled " MIMO - OFDM wireless comm with matlab". In this i understood the mathematics but unable to understand the code for rayleigh and rician fading channels. Pls if some one can share his views on this will be very helpful

1 次查看(过去 30 天)
% plot_Ray_Ric_channel.m
clear, clf
N=200000; level=30; K_dB=[-40 15];
gss=[k-s; b-o; r-^];
% Rayleigh model
Rayleigh_ch=Ray_model(N);
[temp,x]=hist(abs(Rayleigh_ch(1,:)),level);
plot(x,temp,gss(1,:)), hold on
% Rician model
for i=1:length(K_dB);
Rician_ch(i,:) = Ric_model(K_dB(i),N);
[temp x] = hist(abs(Rician_ch(i,:)),level);
plot(x,temp,gss(i+1,:))
end
xlabel(x), ylabel(Occurrence)
legend(Rayleigh,Rician, K=-40dB,Rician, K=15dB)
%%%% functions 1
function H=Ray_model(L)
% Rayleigh channel model
% Input : L = Number of channel realizations
% Output: H = Channel vector
H = (randn(1,L)+j*randn(1,L))/sqrt(2);
%%%% functions 2
function H=Ric_model(K_dB,L)
% Rician channel model
% Input : K_dB = K factor[dB]
% Output: H = Channel vector
K = 10^(K_dB/10);
H = sqrt(K/(K+1)) + sqrt(1/(K+1))*Ray_model(L); %%%%% didnt understand this line.
  2 个评论
dpb
dpb 2019-6-22
What specifically didn't you understand?
The second model is just a constant plus a scaled magnitude of the first. This should be related to the mathematics in the reference, but I haven't tried to find it..

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 WLAN Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by