def x2polyphase(x, N):
"""
Method to convert input signal x (a row vector) into a polphase row vector
of blocks with length N.
Arguments :
x : (1D Array) Input samples
N : (int) Number of subbands
Returns :
y : (3D Array) Polyphase representation of the input signal
Author : Gerald Schuller ('shl'), Dec/2/15
"""
#Number of blocks in the signal:
L=int(np.floor(len(x)/N))
xp=np.zeros((1,N,L), dtype = np.float32)
for m in range(L):
xp[0,:,m] = x[m*N: (m*N+N)]
return xp
评论列表
文章目录