Message Boards Message Boards

0
|
7543 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Specifying output in specific units or format

Posted 8 years ago

Hi;

I am having problems getting the answers to computations in the desired units. For example, in Mathematica Input mode, I key Pi/2 + Pi/4 and mathematica gives the answer of (3 Pi)/4 in radians. But what if I want the answer in degrees? So next I select Free Form Input and enter the command "Pi/2 + Pi/4 in degrees" and get the answer of 135. However even after getting the desired answer in Free Form Input mode, I still do not know how to enter the command in Mathematica Input mode to get the answer in degrees.

This is not just a problem in converting from radians to degrees, but also in entering complex numbers in Rectangular format and desiring the answer in Polar format or the other way around by entering complex numbers in Polar format and desiring the answer in Rectangular format.

I have read the documentation and search the web, but cannot find a way to have Mathematica present the answers in the units or format that I desire. I realize that the answers that Mathematica produces can be converted manually (which I have resorted to doing) to produce the desired units or format, but it seem that there should be a better way much like the //N option.

My formal question would be: How can I tell Mathematica at the time that I enter the compilation the desired units or format that I would like to see the answer?

I am running Mathematica on a HP 64 bit machine using Windows 7. My Mathematica version is 9.0.1.0.

Thanks,

Mitch Sandlin

POSTED BY: Mitchell Sandlin
Posted 8 years ago
UnitConvert[Quantity[Pi/2 + Pi/4, "Radians"], Quantity["Degrees"]]
POSTED BY: Vorname
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract