[Mataa-info] Problem with sample rate and vector spacing
Status: Beta
Brought to you by:
mbrennwa
From: Rodolfo T. <pe....@gm...> - 2013-04-23 21:13:44
|
I've already sent this questions to Matthias, and forgot forward to the list. 1. I'm having a problem with sample rate definition. I generated a signal: *[s,t]=mataa_signal_generator('sweep_lin',44100,1,20 20000]* And then I measured the impulse response: * * *[h,t]=mataa_measure_signal_response(s,44100)* Since I have two microphones, *h* is a two columns matrix. The problem is that this matrix is of *h* have more rows than 44100. This is what I got:* rows(s)* ans = 44100 *rows(h)* ans = 52920 *rows(t)* ans = 52920 I understand why *rows(t)* is equal *rows(h)*, but not why *rows(t)* and * rows(h)* are different from *rows(s)*. It is beacuse of the null terms added? I need to solve this so I can use *mataa_deConvolve[h1,s]* and * mataa_deConvolve[h2,s]* (where *h1* and *h2* are the first and the second columns of *h*, representing the signals of both microphones). 2. Ignoring the problem of the sample rate, I tried to Fourier transform signals *h1* and *h2*. I can't do that because the vector *t *is not even spaced. This is what I got: *[H1,f]=mataa_realFT0(h1,t)* error: mataa_t_to_f0: t must be even spaced! error: called from: error: /mataa/mataa_tools/mataa_t_to_f0.m at line 40, column 1 error: /mataa/mataa_tools/mataa_realFT0.m at line 70, column 3 Hope you can help me! Rodolfo. |