Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Adding Vectors -- Newbie help please

  • To: mathgroup at
  • Subject: [mg52039] Re: Adding Vectors -- Newbie help please
  • From: Peter Breitfeld <phbrf at>
  • Date: Mon, 8 Nov 2004 03:13:20 -0500 (EST)
  • References: <cmfc9b$7k3$>
  • Sender: owner-wri-mathgroup at

motz art schrieb:
> Mathematica v5: How can I input vectors in polar form and
> rectangular form?  
> Example:
> a:= (r1, theta1) + (r2, theta2)  Polar form.
> b:= (re1 , j* im1) + (re2, j*im2) Rectangular form

You could write two simple functions:

pf[a_,d_]:=N[a E^(I d Degree)]
(the "*1." are added to force numerical evaluation)

then you enter your values using pf:

In[1]:= sum=pf[10,30]+pf[20,45]
Out[1]= 22.8024+19.1421 I          (rectangular result)
In[2]:= polar[sum]
Out[2]= {29.772, 40.0128°)        (displayed polar form of result)

Mathematica displays complex numbers in rectangular form by default, 
so there is no need for a function "rectangular".
Input in rectangular form is input as a complex number:

value=100+100 I
polar[value] ---> {141.421, 45.°)

Gruß Peter
Peter Breitfeld, Bad Saulgau, Germany --

  • Prev by Date: NonlinearFit problem
  • Next by Date: Mathematica Categorization - Humor
  • Previous by thread: Re: Re: Adding Vectors -- Newbie help please
  • Next by thread: Re: Re: Adding Vectors -- Newbie help please