Re: Gettting Rid of units
- To: mathgroup at smc.vnet.net
- Subject: [mg16620] Re: [mg16506] Gettting Rid of units
- From: BobHanlon at aol.com
- Date: Fri, 19 Mar 1999 12:53:48 -0500
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 3/16/99 5:48:42 PM, rlove at antispam.neosoft.com writes:
>I have a function I can call that returns a list of angles
>with "Degree" attached, like this:
>
> {96.231 Degree, 96.8642 Degree...}
>
>I can't see how to remove the "Degree" unit. What I want is a
>list of pure values. I confess I don't know how the unit is
>attached and I don't have source for the function called.
>
>Somebody plz provide a simple explantion of how to remove the
>label "Degree" and maybe pointers on what to read to learn how
>this was attached in the first place.
>
Bob,
Degree is just a constant which, when used as a multiplier, converts
degrees to radians
N[90 Degree - Pi/2]
0.
data = Table[k* 10 Degree, {k, 0, 18}]
{0, 10*Degree, 20*Degree, 30*Degree, 40*Degree, 50*Degree,
60*Degree, 70*Degree, 80*Degree, 90*Degree, 100*Degree,
110*Degree, 120*Degree, 130*Degree, 140*Degree,
150*Degree, 160*Degree, 170*Degree, 180*Degree}
N[data]
{0, 0.1745329251994329, 0.3490658503988659,
0.5235987755982987, 0.6981317007977318,
0.8726646259971648, 1.047197551196597, 1.22173047639603,
1.396263401595463, 1.570796326794896, 1.745329251994329,
1.919862177193762, 2.094395102393195, 2.268928027592628,
2.443460952792061, 2.617993877991494, 2.792526803190927,
2.96705972839036, 3.141592653589793}
If you want to plot degrees rather than radians, just divide out the
conversion factor
ListPlot[data/Degree, PlotJoined -> True];
Bob Hanlon