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 abhi_iitian Your Own Question

abhi_iitian
abhi_iitian, Computer Software Engineer
Category: Programming
Satisfied Customers: 1757
Experience:  B-Tech Topper in CSE from IIT Roorkee, Experience as S/W design Engineer at Microsoft India
16530347
Type Your Programming Question Here...
abhi_iitian is online now
A new question is answered every 9 seconds

in excel how do I convert polar back to rectangular

Resolved Question:

in excel how do I convert polar back to rectangular
Submitted: 5 years ago.
Category: Programming
Expert:  abhi_iitian replied 5 years ago.
Hello and welcome to just answer.

I and other experts will get on to solve your problem. Could you help us by providing the following information :

Could you elaborate your problem as to what do you want and what is not happening ?

Are you drawing a chart where you want rectangular instead of polar or do you just want to simply convert from polar to rectangular ?

Also, you could upload the excel file here and when the upload completes, you will get a download link, post that in your next post so that I can correct the problem with that.

Thanks
Expert:  abhi_iitian replied 5 years ago.

Hi, Sorry I missed the already tried portion of your post.

 

To convert from polar to rectangular coordinates, say you have in polar (r, theta)

 

Then in rectangular it becomes (r cos(theta) + r sin(theta) j)

 

So if we have 24.237-37.972 polar

then its rectangular will be

 

( 24.237cos(-37.972) + 24.237 sin(-37.972) j)

 

Now you can use these formula to convert from polar to rectangular coordinates

x = r cos (theta)

y = r sin (theta)

so rectangular coordinates become (r cos(theta) + r sin(theta) j)

 

Now excel expects the angle to be in radian, so if your angle is in degree, you will have to use excel's RADIANS function to convert the degree angle into radian and then use the cos formula,

 

So the formula will be x = r * cos (RADIANS(theta))

y= r * sin(RADIANS(theta))

 

Let me know if there are any doubts

Customer: replied 5 years ago.
Sorry but my internet is playing up. have tried your answer and whilst the results are close to the correct answer they are not the same. Could you please enter my figures into excel at your ens and see if you get the correct answer. If so I must be entering the formulas incorrectly. Thanks Dave
Expert:  abhi_iitian replied 5 years ago.
Hi there, When I do this in my excel for ,
24.237-37.972 polar and the answer is 19.11-14.91j rectangular
say I have columns as

A B C = A1 * cos(RADIANS(B1) D = A1 * sin(RADIANS(B1)
24.237 -37.972 19.10631 -14.9125

I hope you are getting same answer.

Now you say answer is 19.11-14.91j rectangular right which is actually the value we have got from excek rounded up to 2 decimal places,
If we want rounded up to 2 decimal places, we can use the ROUND funstion in excel
SO For rounding up to 2 decimal places, the formula will be

x =ROUND(A1*COS(RADIANS(B1)),2)
y = ROUND(A1*SIN(RADIANS(B1)),2)

Hope that helps.
Customer: replied 5 years ago.

I am really sorry but I cannot get my head around this - plus I am an oldie (65 years) so its probably very simple.

 

Can you put the figures into the formula for me - for example =24.237*cos(RADIANS(37.972)) IS THAT CORRECT???

 

Thanks for being there - you are working late???

Expert:  abhi_iitian replied 5 years ago.
Do not worry , I will assist you till you get it :
You have 24.237-37.972 polar
Is there a minus sign or not with 37.972

If there is no minus sign it is

24.237*cos(RADIANS(37.972)) as you said

which gives the value 19.10631 , did you get this value or not ??

Now 19.10631 when rounded to 2 decimal places, give us 19.11 which is what is needed as the answer.

To get this directly from excel you will need the formula
ROUND(24.237 *COS(RADIANS(37.972)),2)

Let me know at which step you are having trouble ? Tell me what answers you get.

if there is a minus sign iwith 37.972 it will be - 37.972

24.237*cos(RADIANS(- 37.972))
Customer: replied 5 years ago.
Well it looks like I have typed it in correct - but my Excel gives me 19.3352 - this is why I questioned it - so is there a difference in versions of excel? when we get this correct - can I ask one other Q or do I have to start a new thread? regards Dave
Expert:  abhi_iitian replied 5 years ago.
Well, that is very strange to me that it is giving slightly incorrect results to you. I have tried in Excel 97- 2003 format and Excel 2007. Which version do you have ?

Make sure that there is no typographical error and you are entering the exact formula in excel that is =24.237*COS(RADIANS(37.972))

Or are you using the formula with some other values which are getting calculated by some other formula and using them in this formula instead of (24.237, 37.972).
The case may be that you are thinking that they are (24.237, 37.972) but they are actually slightly different and hence the result

If you have a excel sheet and nothing private and you want me to look into it you can upload it, You could upload the excel file here and when the upload completes, you will get a download link, post that in your next post so that I can correct the problem with that.

You can ask another question if it is related to this one here itself or you can ask it in a separate thread as it would get more attention.
Customer: replied 5 years ago.
You are correct it was a mistake in my original data - so I am happy. the other question is this - I have 2 cells resulting in 24.2373 in one sell and 37.972 in the other - is there any way I can automatically combine these into one cell resulting in 24.2373+37.972j so that further calculations can be made on the one cell.Regards Dave
Expert:  abhi_iitian replied 5 years ago.
Hi,

You can use the COMPLEX function is excel to convert this (x,y) in (x+yj) form

Syntax

COMPLEX(real_num,i_num,suffix)

Real_num is the real coefficient of the complex number.

I_num is the imaginary coefficient of the complex number.

Suffix is the suffix for the imaginary component of the complex number. If omitted, suffix is assumed to be "i".

 

So in our case suppose we have the x data in E4 and y data in G4, we will have to use

 

=COMPLEX(ROUND(E4,2),ROUND(G4,2),"j")


=COMPLEX(ROUND(24.2373,2),ROUND(37.972,2),"j")

this will give the result as


24.24+37.97j

 

to get it into that format, ROUND is needed since complex function by default converts data into 15 decimal places and that does not look good.

 

If you do not want even those 2 intermediary columns for x and y , you can use

 

=COMPLEX(ROUND(24.237*COS(RADIANS(37.972)),2),ROUND(24.237*SIN(RADIANS(37.972)),2),"j")

 

but that becomes a bit complicated.

 

 

Also, once you convert into complex , you will need to use complex number functions to get real (x) and imaginary (y) part from that value or to perform any further calculation

 

Hope that helps.

 

 

abhi_iitian, Computer Software Engineer
Category: Programming
Satisfied Customers: 1757
Experience: B-Tech Topper in CSE from IIT Roorkee, Experience as S/W design Engineer at Microsoft India
abhi_iitian and other Programming Specialists are ready to help you
Customer: replied 5 years ago.

OK you have been Excellent - I will not ask further on the second Q as you have given me a good pointer to get it working.

 

If I need you again after I have accepted how do I get back to you - Dave

Expert:  abhi_iitian replied 5 years ago.
Hello Dave,

Thanks for your compliment.

If you need me again after accepting, you can write "For Abhi" in the question title and/or request for me while asking the question initially.

Thanks and have a nice day !!

JustAnswer in the News:

 
 
 
Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
JustAnswer.com...has seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like justanswer.com/legal
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.
 
 
 

What Customers are Saying:

 
 
 
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
  • My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
 
 
 

Meet The Experts:

 
 
 
  • ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >
  • http://ww2.justanswer.com/uploads/SP/spatlanta2010/2011-6-23_12450_photo.64x64.gif ATLPROG's Avatar

    ATLPROG

    Computer Software Engineer

    Satisfied Customers:

    7463
    MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
  • http://ww2.justanswer.com/uploads/ComputersGuru/2010-02-13_051118_Photo41.JPG LogicPro's Avatar

    LogicPro

    Computer Software Engineer

    Satisfied Customers:

    5603
    Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.
  • http://ww2.justanswer.com/uploads/unvadim/2010-11-15_210218_avatar.jpg unvadim's Avatar

    unvadim

    Computer Software Engineer

    Satisfied Customers:

    1158
    Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.
  • http://ww2.justanswer.com/uploads/lifesaver333/2010-10-17_191349_ls.jpeg lifesaver's Avatar

    lifesaver

    Computer Software Engineer

    Satisfied Customers:

    950
    Several years of intensive programming and application development experience in various platforms.
  • http://ww2.justanswer.com/uploads/EH/ehabtutor/2012-8-2_202016_1.64x64.jpg ehabtutor's Avatar

    ehabtutor

    Computer Software Engineer

    Satisfied Customers:

    864
    Bachelor of computer science, 5+ years experience in software development, software company owner
  • http://ww2.justanswer.com/uploads/RA/rajivsharma086/2012-6-6_17128_displaypic.64x64.jpg Raj's Avatar

    Raj

    Computer Engg.

    Satisfied Customers:

    860
    BE CS, 4+ Experience in Programming and Database (ERP)
  • http://ww2.justanswer.com/uploads/eljonis/2010-01-06_130406_eljon2.jpg Eljon's Avatar

    Eljon

    Consultant

    Satisfied Customers:

    590
    11 yrs of programming (PHP, WordPress, XSL, SQL, JavaScript)