?? doppler_or_no.m
字號:
clear all;
N=20 ;% number of multipath arrivals
a=rand(1,N); %amplitude
tau=rand(1,N); %arrival time
f_d=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=[22:0.01:25];
% No Doppler shift
s_t=exp(j*2*pi*f*t); %transmitted signal
y_t=sum(a.*exp(-j*2*pi*f*tau))*exp(j*2*pi*f*t); %received signal
% Doppler shift
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
figure (1)
subplot(2,2,3)
stem(f_shift,a)
xlabel('frequency, Hz')
ylabel('ray amplitude')
title('Doppler Shifts')
subplot(2,2,2)
plot(t,y_t,'r')
title('no Doppler shift')
ylabel('received signal')
xlabel('time, sec')
subplot(2,2,1)
stem(tau,a)
xlabel('Time, Sec')
ylabel('ray amplitude')
title('Time Delay')
subplot(2,2,4)
plot(t,y_d_t)
title('with Doppler shifts')
ylabel('received signal')
xlabel('time, sec')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -