gaussf.m
来自「book:simulation and softeware radiao for」· M 代码 · 共 44 行
M
44 行
% Program 3-13
% gaussf.m
%
% Function to form Gaussaian filter
%
% programmed by H.Harada
function [xh] = gaussf(B,irfn,ipoint,sr,ncc)
%****************************************************************
% irfn : Number of symbols to use filtering
% ipoint : Number of samples in one symbol
% sr : symbol rate
% B : filter coeficiense
% ncc; : 1 -- transmitting filter 0 -- receiving filter
%****************************************************************
point = ipoint;
tr = sr ;
n = ipoint .* irfn;
mid = ( n ./ 2 ) + 1;
fo=B/sqrt(2*log(2));
for i = 1 : n
icon = i - mid;
ym = icon;
xt=1/2*(erf(-sqrt(2/log(2))*pi*B*(ym/ipoint-1/2)/tr)+erf(sqrt(2/log(2))*pi*B*(ym/ipoint+1/2)/tr));
if ncc == 0 % in the case of receiver
xh( i ) = xt ;
elseif ncc == 1 % in the case of transmitter
xh( i ) = xt;
else
error('ncc error');
end
end
%******************** end of file ***************************
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?