Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Sorting into bins
Replies: 1   Last Post: Jun 16, 2011 11:30 PM

 Messages: [ Previous | Next ]
 Goyder Dr HGD Posts: 59 Registered: 1/29/05
Sorting into bins
Posted: Jun 15, 2011 6:33 AM

I wish to sort a list of {{x,y}...} values into uneven bins using the
x values to locate the bin but have the bins contain the y values.
This seems like an application for BinLists but it only seems to work
on a list of x values. The motivation is to give a spectra in terms of
1/3 octaves which is a standard presentation in acoustics. Below I
construct the bin center frequencies cf, the bin boundaries bb and
generate a time history th, spectra, yy and corresponding frequencies
xx. How do I then sort the list into my bins?

Thanks
Hugh Goyder

cf = Table[(1/100.) Round[100 (1000/1024) 2^n], {n, 1, 15, 1/3}];
bb = Table[Sqrt[cc[[i]]*cc[[i + 1]]], {i, 1, Length[cc] - 1}];
sr = 60000.;
th = Table[y, {y, 0, 1, 1/sr}]; n = Length[th];
yy = Take[
Fourier[th, FourierParameters -> {1, -1}], {1, Ceiling[n/2]}];
xx = Table[f, {f, 0, sr/2, sr/n}];
data = Transpose[{xx, yy}];

Date Subject Author
6/15/11 Goyder Dr HGD
6/16/11 Dana DeLouis