Degrees instead of radians

If I for instance change rectangular to polar coordinate it comes out like this:

ToPolarCoordinates[{15, 20}]
{25, ArcTan[4/3]}

Can anyone tell me how to get this in degrees? So far I’ve tried this, which is described in the documentation under “Radian” Convert[n Radian,newunits] converts n Radian to a form involving units newunits.:

Convert[ArcTan[4/3] Radian, Degree]
Convert[ArcTan[4/3], °]

Thanks!

Hi,

this might work:

N[ArcTan[4/3]/Degree]

This

DMSList[N[ArcTan[4/3]/Degree]]

provides an alternative form.

Cheers,

Marco

Benny,

What version of Mathematica are you using? If pre-9, then you need to load the Units package before you can use Convert.

In[1]:= Needs["Units`"]

In[4]:= Convert[ArcTan[4/3], Degree]

Out[4]= (180 \[Degree] ArcTan[4/3])/\[Pi]

Otherwise, use UnitConvert.

In[4]:= UnitConvert[Quantity[ArcTan[4/3], "Radians"], "AngularDegrees"]

Out[4]= Quantity[(180 ArcTan[4/3])/\[Pi], "AngularDegrees"]

Thanks both of you. This:

N[ArcTan[4/3]/Degree]

…was exactly what I was looking for!

Is there a way to change degrees to default? Like on a calculator?

I’m pretty sure this is not possible, in nearly all applications radians are a more ‘natural’ unit to use, rather than degrees. Though degrees are more natural for most humans, because it give you ‘nice’ numbers…

You could use two functions to simplify your work:

ToDeg[rad_] := N[rad/Degree]
FromDeg[deg_] := N[Degree deg]

Benny,

Please seriously consider your context and the reason why you want to do this. If you don’t use Quantity and its associated functions, what you’ll have is a raw numeric value. It will be extremely difficult to trace the “history” of this value to determine what its unit should be. If you just want a nice presentation, then define presentation functions, not conversion functions. Keep the radian based values (or Quantity values) throughout your computations, then apply a presentation function (the result of which is not subsequently used for calculations). Performing manipulations with raw values stripped of their units is notoriously error prone (Mars Climate Orbiter was a spectacular example).

Cheers,

Eric