Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
conversion between polar and rectangular forms

Subject: conversion between polar and rectangular forms

From: siddarth

Date: 8 Oct, 2010 15:51:03

Message: 1 of 3

How do i handle the conversion of a complex number in rectangular form to polar form???

Subject: conversion between polar and rectangular forms

From: Roger Stafford

Date: 8 Oct, 2010 16:20:04

Message: 2 of 3

"siddarth " <cesc.fabregas70@gmail.com> wrote in message <i8nel7$2de$1@fred.mathworks.com>...
> How do i handle the conversion of a complex number in rectangular form to polar form???
- - - - - - - - - -
  The relationship is z = x + y*i = r*exp(i*theta). To get from x and y to r and theta in matlab do:

 r = sqrt(x^2+y^2);
 theta = atan2(y,x);

or from z do this:

 r = abs(z);
 theta = angle(z);

Roger Stafford

Subject: conversion between polar and rectangular forms

From: Steven_Lord

Date: 8 Oct, 2010 17:05:15

Message: 3 of 3



"siddarth " <cesc.fabregas70@gmail.com> wrote in message
news:i8nel7$2de$1@fred.mathworks.com...
> How do i handle the conversion of a complex number in rectangular form to
> polar form???

Use REAL, IMAG, and CART2POL. Use POL2CART to reverse the process.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us