This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i = 1:3 | |
tau(i) = gcc_phat(x{i}(1,:), x{i}(2,:)) | |
end | |
function tau = gcc_phat(sig1, sig2) | |
% Find FFT for the signals | |
fft1 = fft(sig1, fftSize(sig1)); | |
fft2 = fft(sig2, fftSize(sig2)); | |
% Find R(\Tau) | |
G12 = fft1.*conj(fft2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
author: jbenet | |
os x, compile with: gcc -o testo test.c | |
linux, compile with: gcc -o testo test.c -lrt | |
*/ | |
#include <time.h> | |
#include <sys/time.h> | |
#include <stdio.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Translated from a MATLAB script (which also includes C-weighting, octave | |
and one-third-octave digital filters). | |
Author: Christophe Couvreur, Faculte Polytechnique de Mons (Belgium) | |
[email protected] | |
Last modification: Aug. 20, 1997, 10:00am. | |
BSD license |