View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
degrees and radians

4.6 | 11 ratings Rate this file 9 Downloads (last 30 days) File Size: 1.55 KB File ID: #3263 Version: 1.1

degrees and radians



13 Apr 2003 (Updated )

Two helper functions, one converts degrees to radians, the other rads to deg.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information

Two simple functions to save time writing out the code to do a degrees to radians calculation or vice versa.


This file inspired Deg2rad And Rad2deg Conversion Functions.

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
29 Feb 2016 Abel Luis

meu, você é o cara

20 Apr 2015 Nathan Birch

Exactly what I was looking for, thank you.

01 Nov 2011 Brato CHAKRABARTI

Makes computation time longer. Very simple. Yet very useful at times.

19 May 2010 Jeff Gibson

Good simple function. Any true programmer understands the importance of maintainability and code reuse from a software engineering perspective, espcially when the performance hit is infinitesimal.

19 Nov 2009 Richard Medlock

Duane - yes you are probably correct, the original calculation however was done differently and was shorter. However, the benefit for me personally is two fold - 1) it makes it easier to troubleshoot the code because it's more readable and 2) repetitive calculations are generally best kept as functions which enable you to more easily find and replace them, and avoid mistakes in typing out duplicate code. But everyone has their own preferred way of doing things.

Comment only
21 Aug 2009 Duane Hanselman

How does this save time? Function calling overhead makes this computationally slower than direct multiplication. Typing the function call degrees(theta) is 14 keystrokes whereas 180/pi*theta is only 12 keystrokes. The same is true for typing radians(theta). So how does this save time?

Comment only
13 Aug 2009 Joel

Joel (view profile)


15 Mar 2008 Carson Smith


11 Jan 2008 Atul Kumar

29 Aug 2007 padmanaban RPS

good yar

18 Nov 2006 Seung-Bin Lim

29 Nov 2004 ezekiel calderon

if only i knew earlier how to install the file, i would be a lot easier.

05 Apr 2004 a a

thank you so much. you helped me out a whole lot.

18 Aug 2009 1.1

Modified calculation based on a user suggestion to improve speed.

Contact us