Functions > Miscellaneous Functions > Example: Converting Radians to Deg-Min-Sec
  
Example: Converting Radians to Deg-Min-Sec
Use the DMS function for converting radian angles to degrees-minutes-seconds and vice versa.
1. Call the DMS function to convert a vector of degrees-minutes-seconds values into radians.
Click to copy this expression
2. Evaluate variable R.
Click to copy this expression
3. Convert the above result back to DMS by inserting the DMS unit in the placeholder.
Click to copy this expression
4. Define a function to convert a row vector of DMS values to radians.
Click to copy this expression
5. Use the function to convert DMS to radians.
Click to copy this expression
6. Use the floor function to define a function that converts radians to a row vector of DMS values.
Click to copy this expression
Click to copy this expression
Click to copy this expression
7. Use the above function to convert radians to DMS.
Click to copy this expression