Code covered by the BSD License  

Highlights from
Noise tracking algorithm for single-microphone speech signals

from Noise tracking algorithm for single-microphone speech signals by Jan Erkelens
Implements a data-driven noise tracking algorithm suitable for nonstationary noise sources.

Amatrix=createDFTAmatrix(X,H);
function Amatrix=createDFTAmatrix(X,H);
% function Amatrix=createDFTAmatrix(X,H);
% Creates matrix of DFT-amplitudes for a signal X.
% In each column is a spectrum (1:N/2+1), row indices are time-frame indices.
% H is the analysis window. N is the frame length, 50% overlap is used.

% Turn into column vector
X=X(:);
H=H(:);
Nx=length(X);
N=length(H);
M=floor(2*Nx/N-1);
Amatrix=zeros(N/2+1,M);
for k=1:M
    index=(k-1)*N/2+1:(k+1)*N/2;
    F=abs(fft(X(index).*H'));
    Amatrix(:,k)=F(1:N/2+1);
end

Contact us at files@mathworks.com