📄 ray_function.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%此程序为正确程序
% Richard Wyrwas, 2 February 1995.
% plot labels added by Bill Cowley 4/97
function R=RAY(ns,fm,fs)
%fs为取样频率(Hz)
%fm为多谱勒频移(Hz)
%ns为总的取样值(ge)
%disp('ray2: Jakes method: calculating weighted quadrature sinusoids ....');
%disp('with Fs =1kHz ');
% ns=3000;fm=0.5;fs=1000;
j=sqrt(-1);
R=zeros(ns,1);
Mag=zeros(ns,1);
for x=1:ns
tm=x/fs;
I=0.0;
I=1.848*cos(0.983*2*pi*fm*tm);
I=I+1.414*cos(0.932*2*pi*fm*tm);
I=I+0.765*cos(0.850*2*pi*fm*tm);
I=I+0.0*cos(0.739*2*pi*fm*tm);
I=I-0.765*cos(0.603*2*pi*fm*tm);
I=I-1.414*cos(0.446*2*pi*fm*tm);
I=I-1.848*cos(0.247*2*pi*fm*tm);
I=I-2.000*cos(0.092*2*pi*fm*tm);
I=I+1.000*cos(1.000*2*pi*fm*tm);
Q=0.0;
Q=Q+0.765*cos(0.983*2*pi*fm*tm);
Q=Q+1.414*cos(0.932*2*pi*fm*tm);
Q=Q+1.848*cos(0.850*2*pi*fm*tm);
Q=Q+2.000*cos(0.739*2*pi*fm*tm);
Q=Q+1.848*cos(0.603*2*pi*fm*tm);
Q=Q+1.414*cos(0.446*2*pi*fm*tm);
Q=Q+0.765*cos(0.247*2*pi*fm*tm);
Q=Q+0.000*cos(0.092*2*pi*fm*tm);
Q=Q+1.000*cos(1.000*2*pi*fm*tm);
R(x) = 0.227*I+j*Q*0.227;
Mag(x)=abs(R(x));
end;
% plot(Mag);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -