Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: Does Matlab have a function that converts degrees to radians?

Subject: Does Matlab have a function that converts degrees to radians?

From: David

Date: 09 Aug, 2007 14:49:00

Message: 1 of 6

Does Matlab have a function that converts degrees to
radians?

I searched the help but couldn't find anything.

DS

Subject: Re: Does Matlab have a function that converts degrees to radians?

From: dpb

Date: 09 Aug, 2007 14:58:39

Message: 2 of 6

David wrote:
> Does Matlab have a function that converts degrees to
> radians?

Don't believe there's a builtin in function/constant but since it's
simply 180 degrees--> pi radians a simple one-liner would do it. It's
convenient that pi is a supplied constant in that regard.

--

Subject: Re: Does Matlab have a function that converts degrees to radians?

From: someone

Date: 09 Aug, 2007 15:06:08

Message: 3 of 6

"David " <david_m_spinella@yahoo.com> wrote in message
<f9f9gs$fve$1@fred.mathworks.com>...
> Does Matlab have a function that converts degrees to
> radians?
>
> I searched the help but couldn't find anything.
>
> DS


You can write your own one liner:

function y = deg2rad(x)
y = x * pi/180;


also there is sind vice sin, cosd vice cos, etc.

Subject: Re: Does Matlab have a function that converts degrees to radians?

From: Allen

Date: 09 Aug, 2007 16:59:08

Message: 4 of 6

David wrote:
> Does Matlab have a function that converts degrees to
> radians?
>
> I searched the help but couldn't find anything.
>
> DS

? I may be missing something.. but won't deg2rad(); work? And
rad2deg(); conversely?

-Allen

Subject: Re: Does Matlab have a function that converts degrees to radians?

From: Allen

Date: 09 Aug, 2007 17:02:51

Message: 5 of 6

David wrote:
> Does Matlab have a function that converts degrees to
> radians?
>
> I searched the help but couldn't find anything.
>
> DS

Crap, deg2rad is part of the mapping toolbox... sorry!!

There is this file in the mathworks file area:

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3263

submitted by Richard Medlock

If the above link doesn't work search for degrees and radians.

Hope this helps,
-Allen

Subject: Re: Does Matlab have a function that converts degrees to radians?

From: us

Date: 09 Aug, 2007 17:04:53

Message: 6 of 6

Allen:
<SNIP OP has an angular conversion problem...

> I may be missing something.. but won't deg2rad(); work?
And rad2deg(); conversely...

yes, if(f) the OP has the <mapping tbx>... that they are
part of...

us

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
rad us 09 Aug, 2007 13:05:24
deg us 09 Aug, 2007 13:05:24
conversion us 09 Aug, 2007 13:05:24
angle us 09 Aug, 2007 13:05:24
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics