Rank: 1840 based on 31 downloads (last 30 days) and 4 files submitted
photo

Christopher Brown

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Christopher View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 Jun 2002 Screenshot t60.m Returns an estimate of t60, a measure of reverberation time. Author: Christopher Brown sound, reverberation, t60, reverb, utilities 12 3
  • 3.0
3.0 | 2 ratings
04 Apr 2002 playrectdt Plays and/or records on Tucker Davis Sytem 2 hardware. Author: Christopher Brown hardware driver, play, record, tucker, davis, test and measurement 0 0
18 Jan 2002 mls.m Generates maximum length sequences, which are pseudorandom noises useful for acoustic measurements. Author: Christopher Brown sound, maximum, length, sequence, pseudorandom, noise 19 6
  • 4.4
4.4 | 5 ratings
04 Jan 2002 r2cum Returns a vector containing cumulative r-squared values. Author: Christopher Brown probability, r, correlation, statistics, cumulative, vector 0 0
Comments and Ratings on Christopher's Files View all
Updated File Comment by Comments Rating
21 Jul 2011 t60.m Returns an estimate of t60, a measure of reverberation time. Author: Christopher Brown Geier, Matthias

It's me again ...

Finally, I found the problem in your code!

First, I was wrong with my speculation that the r-squared formula would be off by a division by "n".
The formula is OK (it's just the squared version of Pearson's product-moment correlation coefficient).
The following regression is also correct.

However, there is an error when calculating the intersection between the regression line with the -60 dB line.

Your code is:

rt = round(abs(60/slope(1))-yintercept);

This works if yintercept is (very close to) zero (as it is in the nice picture above. But in the general case (and in my case), yintercept is a non-negligible negative value and the resulting reverberation time is wrong.

The correct line would be:

rt = -(yintercept + 60)/slope;

As I said, the regression is correct, however it could be written a little more compactly like this:

xx = xtime(1:stop);
yy = y(1:stop);
slope = (mean(xx.*yy) - mean(xx)*mean(yy))/(mean(xx.^2) - mean(xx)^2);
yintercept = mean(yy) - slope * mean(xx);

That's it about my first point, I'm still searching for an answer regarding my second question.

cheers,
Matthias

18 Jul 2011 t60.m Returns an estimate of t60, a measure of reverberation time. Author: Christopher Brown Geier, Matthias

Hi Christopher.

Thanks for this really useful function!

I have 2 questions:

1) Can you please provide the original formula for the "r-squared" you used?
It seems to be related to the squared "sample Pearson correlation coefficient" but I think it could be off by a division by "n".
I searched in some statistics books and on the web and the problem is there are many different definitions of "r-squared".

2) By default, your function discards the first 50 ms of the result of the "cumulative r-squared". Is this a value you found by experience? In which situations would you suggest different values?

TIA,
Matthias

18 Feb 2007 mls.m Generates maximum length sequences, which are pseudorandom noises useful for acoustic measurements. Author: Christopher Brown Yuen, Wa

very efficient code

14 Dec 2006 mls.m Generates maximum length sequences, which are pseudorandom noises useful for acoustic measurements. Author: Christopher Brown Streeter, Tim

I apologize... I made a mistake in the stating that there is an error in the primitive polynomial list. Those tap lists are correct.

14 Dec 2006 mls.m Generates maximum length sequences, which are pseudorandom noises useful for acoustic measurements. Author: Christopher Brown Streeter, Tim

There are couple issues with this MLS sequence generator. The primitive polynomial list has a few errors (lines 29-180). This list is not necessary given that Matlab has a built in function to generate these (gfprimdf.m) For example, the 7th order MLS
sequence output is incorrect. Given the use of the tap list, this code is slightly inefficient.

Top Tags Applied by Christopher
sound, correlation, cumulative, davis, hardware driver
Files Tagged by Christopher View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 Jun 2002 Screenshot t60.m Returns an estimate of t60, a measure of reverberation time. Author: Christopher Brown sound, reverberation, t60, reverb, utilities 12 3
  • 3.0
3.0 | 2 ratings
04 Apr 2002 playrectdt Plays and/or records on Tucker Davis Sytem 2 hardware. Author: Christopher Brown hardware driver, play, record, tucker, davis, test and measurement 0 0
18 Jan 2002 mls.m Generates maximum length sequences, which are pseudorandom noises useful for acoustic measurements. Author: Christopher Brown sound, maximum, length, sequence, pseudorandom, noise 19 6
  • 4.4
4.4 | 5 ratings
04 Jan 2002 r2cum Returns a vector containing cumulative r-squared values. Author: Christopher Brown probability, r, correlation, statistics, cumulative, vector 0 0

Contact us at files@mathworks.com