rcf.m
来自「basic_cama 基本的CDMA仿真程序」· M 代码 · 共 23 行
M
23 行
% T=0.005;
% fs=200e3;
% r=0.5;
% t=0:1/fs:T-1/fs;
% % t=-0.00005:1/fs:T-1/fs-0.00005;
% h=sinc(t.*fs).*cos(pi*r.*t*fs)./(1-4*(r^2)*(t.^2)*(fs^2));
% figure
% subplot(211),plot(h);
% subplot(212),plotpp(h,fs)
% Parameters.
Delay = 3; DataL = 20; R = .5; Fs = 8; Fd = 1; PropD = 0;
% Generate random data.
x = randsrc(DataL, 1, [], 1245);
% at time 0, 1/Fd, 2/Fd, ...
tx = [PropD: PropD + DataL - 1] ./ Fd;
% Design filter.
[yf, tf] = rcosine(Fd, Fs, 'fir', R, Delay);
% Upsample and filter.
[yo, to] = rcosflt(x, Fd, Fs, 'filter', yf);
figure
plotpp(yo,fs)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?