?? doppler_shifts.m
字號:
clear all;
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.01
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,1)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.01')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.05
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,2)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.05')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.1
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,3)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.1')
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=0.5
shift=rand(1,N)*2*f_d-f_d; %Doppler shifts
f=10; % the frequency of the transmitted time harmonic signal
f_shift=f+shift;
t=[0:0.01:50];
n=1;
y_d_t=sum(a(n)*exp(-j*2*pi*f*tau(n)))*exp(j*2*pi*(f_shift(n))*t);
for n=2:N
y_d_t=y_d_t+a(n)*exp(-j*2*pi*f*tau(n))*exp(j*2*pi*(f_shift(n))*t); %received signal
end
subplot(2,2,4)
plot(t,y_d_t)
xlabel('time, sec')
ylabel('f_D=0.5')
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -