?? modelo_jakes.m
字號:
%Modelo Jacks con Rayleigh
clc;
clear all;
close all;
k = 12; % Rayos del "Scattering"
fd = 0.02; % N鷐ero m醲imo para el Doppler Shifting
M = 50; % Senoidales
sumatoria = 0; % Sumatioria
N = 1024; % Tama馻no de la secuencia
ds = 0.1; % Duraci髇
T = (N-1)*ds;
t = 0:ds:T;
for n=1:M
betan = (pi*n)/(M+1);
thetan = betan + (2*pi*(k-1)/(M+1));
alphan = pi * (n-0.5)/(2*M);
fn = fd * cos(betan);
sumatoria = sumatoria + (cos(betan) + j*sin(betan)) * cos(2*pi*fn*t+thetan);
end
alpha = 0;
R = 2*sqrt(2)*(sumatoria+ 1/sqrt(2)*(cos(alpha)+ j*sin(alpha)) * cos(2*pi*fd*t));
[corr,m] = xcorr(R,'coeff');
m1 = find(m>=0);
plot (abs(R))
title('Suma de sinoidales')
grid on
figure
plot(10*log10((abs(fft(R))).^2))
title('Densidad de potencia del espectro')
grid on
figure
plot(m(m1),corr(m1));
title('Correlaci髇')
grid on
figure
plot(10*log10((abs(xcorr(R))).^2))
title('Magnitud de potencia (dB)')
grid on
figure
plot(abs(ifft(fft(R))));
title('Respuesta al impulso')
grid on
figure
hist(abs(R))
title('Distribuci髇 Rayleigh')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -