finding angle of slope...

Discussion in 'Microsoft Excel Charting' started by Brad, Jun 21, 2006.

  1. Brad

    Brad Guest

    Using Chart, Add Trendline, then selecting Linear in Excel to chart a linear
    regression line on a series creates a new line on my chart with either a
    positively or negatively sloped regression line.

    Is there any way, using this built-in Excel feature, to convert the result
    into degrees so that I can then label the regression line in degrees, for
    example, 45 degrees?

    My thanks for any ideas. Brad
     
    Brad, Jun 21, 2006
    #1
    1. Advertisements

  2. Brad wrote on Wed, 21 Jun 2006 15:52:26 -0500:

    B> Is there any way, using this built-in Excel feature, to
    B> convert the result into degrees so that I can then label the
    B> regression line in degrees, for example, 45 degrees?

    You could display the equation of the trend line where the
    coefficient of X is the slope tho' I believe it would be more
    accurate, in earlier versions of Excel, to use LINEST to get the
    slope; slope:=INDEX(LINEST(known_y's,known_x's),1). Then all you
    have to do is convert the slope, which is the tangent of an
    angle, to the angle = DEGREES(ATAN(SLOPE)). See LINEST and other
    worksheet functions in HELP.


    James Silverton.
     
    James Silverton, Jun 21, 2006
    #2
    1. Advertisements

  3. The functions SLOPE and INTERCEPT give the m and c of y=mx+c, respectively
    Suppose A1 and B1 have text such as X and Y, while A2:A10 have the x-values
    and B2:B10 have the y-values
    In D2, I entered =SLOPE(B2:B10,A2:A10) and get a slope value (in my example
    it was 2)
    Now this slope is the tangent of the line; so ATAN(D2) will tell me the
    angle
    But like most computer programs,Excel thinks of angles in radians (the only
    'pure' measure to use)
    If I want degrees I need to convert the result to degrees; let's do it all
    in one cell with formula =DEGREES(ATAN(D2))
    Or it I want to be very clever I could use a single cell with
    =DEGREES(ATAN(SLOPE(B2:B10,A2:A10)))
    The answer displays as 75.96376
    If I want to see degrees, minuets an second I will visit Chip's site at
    http://www.cpearson.com/excel/latlong.htm and re-learn how to do it (I
    actually like decimal values)
    best wishes

    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email


    "Brad" <> wrote in message
    news:%...
    > Using Chart, Add Trendline, then selecting Linear in Excel to chart a
    > linear regression line on a series creates a new line on my chart with
    > either a positively or negatively sloped regression line.
    >
    > Is there any way, using this built-in Excel feature, to convert the result
    > into degrees so that I can then label the regression line in degrees, for
    > example, 45 degrees?
    >
    > My thanks for any ideas. Brad
    >
     
    Bernard Liengme, Jun 21, 2006
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kendra

    How do you plot an undefined slope?

    Kendra, Mar 4, 2004, in forum: Microsoft Excel Charting
    Replies:
    1
    Views:
    962
  2. routeram

    Lines of a particular slope that can be moved around

    routeram, Sep 24, 2004, in forum: Microsoft Excel Charting
    Replies:
    2
    Views:
    237
    Jon Peltier
    Sep 25, 2004
  3. routeram

    Lines of a particular slope that can be moved around

    routeram, Sep 25, 2004, in forum: Microsoft Excel Charting
    Replies:
    1
    Views:
    161
    Bernard Liengme
    Sep 25, 2004
  4. routeram

    Lines of a particular slope that can be moved around

    routeram, Sep 25, 2004, in forum: Microsoft Excel Charting
    Replies:
    0
    Views:
    211
    routeram
    Sep 25, 2004
  5. Guest
    Replies:
    2
    Views:
    587
    Jerry W. Lewis
    Apr 7, 2005
Loading...

Share This Page