The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Goyder Dr HGD

Posts: 59
Registered: 1/29/05
Sorting into bins
Posted: Jun 15, 2011 6:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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?

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}];

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2017. All Rights Reserved.