How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Billy Ross Your Own Question
Billy Ross
Billy Ross, Computer Engineer
Category: Programming
Satisfied Customers: 1
Experience:  Over 20 years of experience
106903003
Type Your Programming Question Here...
Billy Ross is online now
A new question is answered every 9 seconds

Have you excel formula for converting Cartesian coordinates

This answer was rated:

Hi have you excel formula for converting Cartesian coordinates from rectangular to polar and vice versa,
JA: When did you last update Excel?
Customer: I have latest Microsoft office, but I don’t know how to create the formula.
JA: Anything else you want the Software Expert to know before I connect you?
Customer: Yes typical problem is x1 100, y1 100, x2 200, y2 200, answer whole circle bearing 45 degrees, distance 141.4

Hello, I am Billy Ross and I will be happy to help you.

I understand you want to convert from rectangular to polar and vice versa, on Excel

and I understand you need guidance on how to enter the formula?

Here's a quick way to do these conversions in Excel.

First, from Polar to Cartesian.

Lets assume you have the value of the radius on cell B1

and the angle (in degrees) in cell B2

the formula for X, would be =B1*COS(B2)

the formula for Y, would be =B1*SIN(B2)

note the keys to these formulas are the trig functions COS and SIN, which are what you would expect, and work on values expressed in ANGLES.

** note above the value is expressed in DEGRES not angles, I apologize.

Now, to convert from Cartesian to Polar, consider the following.

for this example, I am assuming we have the value of X in cell B1 and the value of Y in cell B2

the formula for r is =SQRT(POWER(B1,2)+POWER(B2,2))

and the formula for tetha is =DEGREES(ATAN(B2/B1))

Note the function Power(A,b) is used to elevate A to the power of b, hence Power(B1,2) will yield "B1 squared".

Another note is that ATAN (arctangent function) returns a value in RADIANS, so we have to convert those to degrees using the function =DEGREES(r).

Hope this helps!!

I am Billy Ross and it has been a pleasure helping you with your Polar to Cartesian conversions.

Please let me know if there is anything else I can be of assistance.

All the best!

B.Ross

Billy Ross and 5 other Programming Specialists are ready to help you
Customer: replied 6 days ago.
Hi Billy
Thankyou so much.
I actually work with degrees/Whole Circle Bearings so the angular output would be between 0 and 360 degrees as with compass.
What is formula please to convert degree decimal, to degree, minutes, seconds, And vice versa.
Thankyou
Robert
Customer: replied 6 days ago.
Hi Billy.
I don’t require a connection, my excel is on a separate device at the office.
Thanks
Robert

Hello, Robert

Converting Degrees Decimal to degrees, minutes and seconds requires some nested calculations.

Try the following, to convert from Degres Decimals to degrees, minutes and seconds.

Assuming the Degree Decimal value is on A2,

Lets calculate first Degrees on B2 as follows: =INT(A2) -- simply, the integer part of the initial value

then for minutes, we take the decimals and multiply by 60, on C2: =INT((A2-B2)*60)

Lastly, the seconds is the decimals from the minutes, times 60 again: =((A2-B2)*60-INT((A2-B2)*60))*60

Now to convert from Degree, minutes and seconds into a Degree decimal,

Lets assume Degrees are in B2, Minutes in C2 and Seconds in D2.

and we'll calculate the total in A2.

so use the following formula in A2: =B2+(C2/60)+(D2/3600)

which simply says: the degrees (the integer part) PLUS minutes divided by 60 (seconds) and seconds divided by 3600 (seconds)

give it a spin!

cheers!

All the best.

Billy

Customer: replied 6 days ago.
Hi Billy
Would definitely request you again.
Would you also be able to write same programmes in Casio basic language for use on their FX range calculators.
Thanks
Robert

Hello, Robert

sorry for late response.

Yes! we work on those Casio Basic programs.

Cheers

Billy