Psst... Ready to join TalkBass and start posting, make new friends, sell your gear, and more?  Register your free account in 30 seconds.

Trigonometry in spreadsheets

Discussion in 'Off Topic [BG]' started by Petebass, Aug 4, 2004.


  1. Petebass

    Petebass

    Dec 22, 2002
    QLD Australia
    Who said you never use this stuff once you leave school? Well the truth it I haven't used is in 14 years, but it's comming back to me.

    Lets say I need to build a right angle triangle out of wood. Let's say that two of the sides equal. I know how to calculate the length of the third side (hypotenuse^2 = a^2 * b^2). I also know that we'd have one 90 degree angle, and two 45 degree angles.

    Now lets say that all three sides are a different length, say A=400mm and B=680mm. The hypotenuse calculation is the same (C= 788.92mm). So far so good, but now I have 3 different angles as well, one is 90 degrees. I can calculate the other angles using my scientific calculator, by pressing {680/788.92}{SHIFT} {SINE} - so I now know one angle is 59.53 Degrees. The other one is {400/788.92}{SHIFT}{SINE} = 30.47 degrees. Just to check, 90+59.53+30.47 = 180, so I'm know my math is correct.

    Ok now I'm trying to put all this into an Excel spreadsheet. The hypotenuse calc is easy enough. How on earth do I formularise the {SHIFT}{SINE} part?
     
  2. jommit52

    jommit52

    Jul 11, 2004
    um...........trigonometry sucks!!!!
     
  3. In Excel, there is a toolbar item that looks like "fx". Clicking on this button will reveal many types of functions. There is a sub-category for *trig* functions within it. You may want to do a Help search within Excel for "Function" and "Toolbar". In the event this tool is hidden, for some reason, this search should reveal to you what the tool looks like.
    Good luck.
     
  4. If I'm reading correctly, there are a couple things you're misunderstanding here...first, a primer:

    sin(angle) = opposite side / hypotenuse
    cos(angle) = adjacent side / hypotenuse
    tan(angle) = opposite side / adjacent side

    So, you use sin, cos and tan when you know the angle and need to find side lengths (or ratios between them). HOWEVER, you're trying to find the angle when you know two sides, so you need to do the inverse...for this, you use the following:

    angle = arcsin(opposite/hypotenuse)
    angle = arccos(adjacent/hypotenuse)
    angle = arctan(opposite/adjacent)

    My calculator says sin^-1 rather than arcsin, but it's the same thing...I'm assuming that's what your calculator does when you hit SHIFT before sin.

    Excel does have the arcXXX functions, just look in the function list that Lenny mentioned...it calls them ASIN, ACOS and ATAN. So just pick your formula, choose the source cells where you're storing your side length data, and there you have it.

    One extra complication is that Excel does trig functions using radians instead of degrees, so you'll presumably want to convert to degrees afterward. There's a function for that too, called DEGREES, or you can do it manually:

    degrees = radians*180/pi

    I hope I didn't confuse you, or alternately, insult you by rattling off a bunch of crap you already knew :p Hope that helped, good luck!

    ...that was kinda fun, almost makes me miss high school math...shame that college Calc 3 pretty much killed my enjoyment of the subject :scowl:
     
  5. Brad Barker

    Brad Barker Supporting Member

    Apr 13, 2001
    berkeley, ca
    silentstranger pretty much covered it.

    just like to say that "arc[trig function]" is also called "inverse [trig function]." that's the way that the calculators notate it: sin^-1 means "inverse sine." i like using "arcsine" because it reminds me that we are talking about an angle here.

    and calc 3 is the most fun math class! you finally get to 3-d stuff.
     
  6. Petebass

    Petebass

    Dec 22, 2002
    QLD Australia
    You guys ROCK! That works.

    I've combined the Arcsine formula and degrees conversion into one cell and it looks something like

    =DEGREES(ASIN(+I19/G19))

    ..where I19 is the length of the opposite side, and G19 is the Hypotenuse.

    To be honest I didn't even understand this stuff all that well at school. 14 years later it's even fuzzier. Thanks for helping clear that up.
     
  7. Wha? Isn't that illegal? :D
     
  8. Petebass

    Petebass

    Dec 22, 2002
    QLD Australia
    Oh c'mon it's 6.30am over here. Trig at that time should be illegal :)
     
  9. Petebass

    Petebass

    Dec 22, 2002
    QLD Australia
    See it's so early I only just noticed that you changed it to make me think I got it wrong........

    ThinkingofYou 1, Petebass 0.
     
  10. I'm cool like that. :smug: