×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

help with basic Excel trig error.

help with basic Excel trig error.

help with basic Excel trig error.

(OP)
Hi guys,
I just found this form and I need some help.  I am fairly savy in Excel and am using it to verify(troubleshoot) an application in another program I am developing.  Since the error repeats in both I am suspecting ME!
Here is the chore. Set two non zero coordinate points like x1, y1 and x2, y2.  Use any units. Find slope(angle) using ATAN and the length using Pythagorean formula. Now find the X and Y components using SIN & COS.  Add them to x1 and y1.
You should get the coordinates of x2 and y2. I am not and that is my problem.  For my example:
x1 = 100
y1 = 100
x2 = 200
y2 = 200

If I do the math I get:
x2 = 199.7020561
y2 = 199.7020561

This is nearly 1.5 % off. I am doing this in the spreadsheet so ther is no real code involved.

I am not imune to making stupid errors.
Thanks,
Russ

RE: help with basic Excel trig error.

Excel trig functions use radians.

RE: help with basic Excel trig error.

(OP)
Thanks for the tip MintJulep but it is nonsequitur!

RE: help with basic Excel trig error.

Your hypotenuse (Pythagorean) calculation is rounding to an integer somewhere.  The hypotenuse length for your given points is exactly 100*(2^0.5), or somewhere around 141.4214.  If you truncate the decimal portion and perform your sine and cosine functions on a value of 141 you will end up with the result you posted.

RE: help with basic Excel trig error.

(OP)
I found the problem.  I had a round() function in that I did not detect early enough.  Thanks for viewing.  Like I said I am not imune to stupid errors.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources