Results 1 to 1 of 1

Thread: Find Gradient and Angle from 2 Data points.

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2009
    Posts
    1

    Find Gradient and Angle from 2 Data points.

    Find Gradient and Angle from 2 Data Co-ordinates.

    Trying to find the gradient and then the angle.

    The program will open a text file and the program will do its stuff.

    The text file will be like: I have 2 co-ordinates (X, Y) just contain numbers.

    4 5
    5 6

    The formula.
    m = (Y2 - Y1) / (X2 - X1)

    Dont really know how to write the program to read the second column and line 1 take away second column line 2 to divide with first column line 1 take away first column line 2.

    After figuring out the gradient.

    |m| = square root of m^2

    Thanks
    Last edited by chiyo; Sep 13th, 2009 at 09:27 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width