stiansjogren icon

komteo

stiansjogren | PRO | 04/27/17 01:12:54 PM UTC | 0 ⭐ | 689 👁️ | Never ⏰ | []
text |

700 B

|

None

|

0 👍

/

0 👎

% ****************************************************
% filter length from peak to end (half of total filter length
T = 0.01;
% roll-off factor
beta = 0.5;
% oversampling ratio
osr = 128;
% sample interval
ts = T/osr;
% window length in cycles
M = 10;
% time index
t = [0:ts:M*T].';
% position of singularity points in time
tsingidx = osr/(2*beta)+1;
% filter coefficients
g1 = sin(t/T)./(t/T).*cos(pi*beta*t/T);
g2 = (1-(2*beta*t/T).^2);
g = g1./g2;
% fix singularity points in function
g(1) = 1;
g(tsingidx) = pi*beta/2*sin(1/(2*beta));
% mirror and fold pulse to get symmetric coefficients
rc = [g(end:-1:2);g];
time = [-t(end:-1:2);t];
% ****************************************************

Comments