Got Questions? Get Answers.
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:
how to get complex data from magnitude and phase data

Subject: how to get complex data from magnitude and phase data

From: xin xin

Date: 22 Mar, 2009 10:23:02

Message: 1 of 4

as we know, we can calculate the angle and amplitude from angle() and abs()
but is there any function can reverse it, get the complex data series from angle series and amplitude.
thx

Subject: how to get complex data from magnitude and phase data

From: Roger Stafford

Date: 22 Mar, 2009 10:44:01

Message: 2 of 4

"xin xin" <threegold79@gmail.com> wrote in message <gq53i6$9e1$1@fred.mathworks.com>...
> as we know, we can calculate the angle and amplitude from angle() and abs()
> but is there any function can reverse it, get the complex data series from angle series and amplitude.
> thx

  If t is the 'angle' and r is the 'abs' of a complex quantity z, then

 z = r.*exp(t*sqrt(-1));

Roger Stafford

Subject: how to get complex data from magnitude and phase data

From: xin xin

Date: 22 Mar, 2009 16:43:01

Message: 3 of 4

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gq54ph$po3$1@fred.mathworks.com>...
> "xin xin" <threegold79@gmail.com> wrote in message <gq53i6$9e1$1@fred.mathworks.com>...
> > as we know, we can calculate the angle and amplitude from angle() and abs()
> > but is there any function can reverse it, get the complex data series from angle series and amplitude.
> > thx
>
> If t is the 'angle' and r is the 'abs' of a complex quantity z, then
>
> z = r.*exp(t*sqrt(-1));
>
> Roger Stafford

thanks for your reply, but this equation can be used when r and t is one dimension.
and r or t are vector in my application. any other function applicable?

Subject: how to get complex data from magnitude and phase data

From: Jim Rockford

Date: 22 Mar, 2009 18:46:33

Message: 4 of 4

On Mar 22, 12:43=A0pm, "xin xin" <threegol...@gmail.com> wrote:
> "Roger Stafford" <ellieandrogerxy...@mindspring.com.invalid> wrote in mes=
sage <gq54ph$po...@fred.mathworks.com>...
> > "xin xin" <threegol...@gmail.com> wrote in message <gq53i6$9e...@fred.m=
athworks.com>...
> > > as we know, we can calculate the angle and amplitude from angle() and=
 abs()
> > > but is there any function can reverse it, get the complex data series=
 from angle series and amplitude.
> > > thx
>
> > =A0 If t is the 'angle' and r is the 'abs' of a complex quantity z, the=
n
>
> > =A0z =3D r.*exp(t*sqrt(-1));
>
> > Roger Stafford
>
> thanks for your reply, but this equation can be used when r and t is one =
dimension.
> and =A0r or t are vector in my application. any other function applicable=
?


The expression that Roger wrote is perfectly applicable to your
situation. Try it!

If "t" is a vector then the output of "exp(t*sqrt(-1))" is also a
vector of the same length as "t". The operator preceding it "r."
means to multiply the vector "r" component by component with
whatever vector that follows it. The result is again a vector, which
apparently is what you want.

Jim

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