Wikipedia:Reference desk/Archives/Mathematics/2015 June 19
Mathematics desk | ||
---|---|---|
< June 18 | << May | June | Jul >> | June 20 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
June 19
editFormula for this?
editHello everyone. I am generating a 440Hz square wave. Now The wave will shift high for 50 audio samples and then shift low for another 50 samples. Now when I Generate a 220hz wave, the high/low sample length doubles. The wave will shift high for 100 audio samples and then shift low for another 100 samples. Is there a formula to calculate the sample length of the high and lows of a square wave based on this ratio? Thanks for your help in advance, —SGA314 I am not available on weekends (talk) 18:38, 19 June 2015 (UTC)
- If I am understanding you correctly, it takes 100 samples for a single complete cycle of your 440Hz square wave, meaning that your sampling frequency is 100 * 440Hz = 44kHz. Likewise, it takes 200 samples for a single complete cycle of your 220Hz wave, meaning that your sampling frequency is 200 * 220Hz = 44kHz. -- ToE 20:57, 19 June 2015 (UTC) Edit: And your sampling period is 1 / 44khz ≈ 22.7 μs. -- ToE 20:59, 19 June 2015 (UTC) Edit2: Likewise, the period of your 440Hz and 220Hz square waves are 1/440Hz ≈ 2.27 ms and 1/220Hz ≈ 4.45 ms, with half-periods equal to half that (since you are describing 50% duty cycle square waves), 1.14 ms and 2.27 ms respectively. -- ToE 21:09, 19 June 2015 (UTC)
- Here is what I have so far for the formula:
- F / (8.8 * (pow(F / 440), 2))
- F = Frequency
- I think this will work. Is this formula correct? —SGA314 I am not available on weekends (talk) 18:04, 22 June 2015 (UTC)
Estimating the number of glass cubes in a container
editThe hotel I'm staying at has a container full of little glass cubes. The suggestion box says that each guest may insert a slip of paper with a guess as to how many cubes are in the container, and whoever gets closest wins a $25 gift card. The container is a hexagonal prism, but not a regular hexagon; the top and bottom borders are longer than the other 4. The container is clear plastic which allowed me to roughly count the length of each side with the glass cubes as the unit of measurement.
The hexagon has sides of 6x6x10x10x6x6 cubes, and the height of the container is 7 cubes. I just want to check my math.
- To find the hexagon's area, I mentally divided the Hexagon into two isosceles triangles and one large rectangle. The square I determined through counting cubes was 10x8, which gives an area of 80.
- The 6x6x8 triangles I divided again into right triangles of 6x4x4.5 (the latter I got through a^2 + b^2 = c^2, which gave me radical 20). That means each of the four right triangles have an area of 9, for a total of 36.
- 36+80=116, the total area of the Hexagon. Multiply by 7, the height, to get a total estimated area of 812.
So I guessed 812 cubes. Did I do all the steps in my estimation correctly? 71.41.191.124 (talk) 20:53, 19 June 2015 (UTC)
- Are the cubes packed in a neat array, or just crammed in there any which way ? StuRat (talk) 21:28, 19 June 2015 (UTC)
- If the hexagon has equal angles and opposite sides equal then the area is √3/2(ab+ac+bc) where the sides are a, b, c, a, b, c. If the sides are 6, 6, 10, 6, 6, 10 that makes √3(78)=135.1 making the volume of the cylinder 945.7. It sounds though that the angles are not equal and from the measurements the angles at the end are closer to 80° than the 120° you'd get with all angles equal. If the diagonal forming a side of the inner rectangle is 8 then the total area would be 80+16√5=115.8 and the volume would be 810.4. But StuRat's point is valid in that the volume only establishes an upper bound and a lot depends on how the cubes are arranged. If there are 7 layers, and each layer is arranged so the sides are parallel to the longer sides, then each layer might have 80+24=104 cubes making a total of 728. On the other hand, if the corners at the ends are at right angles and you fit the squares into them, it's conceivable you'd get 113 cubes per layer or 791 total. But if the cubes are thrown in at random then you have to allow for the interstices and the math for that is difficult. There is probably some limiting density d<1 and you might use d×Volume as an estimate, but I don't know what d is or how to compute it. --RDBury (talk) 01:52, 20 June 2015 (UTC)
- OP here, the glass cubes are thrown in randomly, albeit packed together. So using them as a measuring tool is not perfect as they aren't going to parfectly fill the container, but I figured it would be close enough considering my goal is simply to get closer than any other hotel tenant's guess. — Preceding unsigned comment added by 2600:100C:B003:7226:435E:8A5A:75F6:B511 (talk) 02:24, 20 June 2015 (UTC)
- Sounds like the way to go. I once got the number of marbles in a large glass container exactly that way but I don't think I'll beat my mother who guessed the weight of a bullock at the local fair and put the farmers' noses out of joint :) Dmcq (talk) 11:20, 20 June 2015 (UTC)
- Sounds like I got my answer, but for what it's worth I threw together a quick diagram. The 8s are iffy because I counted manually instead of doing the math: http://imgur.com/PJc2iq2 — Preceding unsigned comment added by 67.78.65.26 (talk) 16:05, 20 June 2015 (UTC)
- Sounds like the way to go. I once got the number of marbles in a large glass container exactly that way but I don't think I'll beat my mother who guessed the weight of a bullock at the local fair and put the farmers' noses out of joint :) Dmcq (talk) 11:20, 20 June 2015 (UTC)