Home > cbassSouthFunctions > CJCThesisFunctions > hartrao > pfb_fir.m

pfb_fir

PURPOSE ^

SYNOPSIS ^

function pfb_fir(x):

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pfb_fir(x):
0002     N = len(x)    # x is the incoming data time stream.
0003     taps = 4
0004     L = 512   # Points in subsequent FFT.
0005     bin_width_scale = 1.0
0006     dx = 3.1457/L
0007     X = numpy.array([n*dx-taps*math.pi/2 for n in range(taps*L)])
0008     coeff = numpy.sinc(bin_width_scale*X/math.pi)*numpy.hanning(taps*L)
0009 
0010     y = np.array([0+0j]*(N-taps*L))
0011     for n in range((taps-1)*L, N):
0012         m = n%L
0013         coeff_sub = coeff[L*taps-m::-L]
0014         y[n-taps*L] = (x[n-(taps-1)*L:n+L:L]*coeff_sub).sum()
0015 
0016     return y

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005