# 【error】Undefined function or method ‘rad2deg’ for input arguments of type ‘double’.

Reason: when the function isn’t on the MATLAB path or in pwd.

1. make sure that you are able to find the function using:

The return means It is not on the MATLAB path or in PWD. That is often unhelpful in this case – it tells you Matlab can’t find the file, which you knew already.

2.  make sure that the file that matlab is finding (use which) requires the same type as the first argument you are actually passing.

Basically, Matlab looks for files in:

1. The current directory (`pwd`);
2. Directly in a directory on the path (to see the path, type `path` at the command line)
3. In a directory named `@(whatever the class of the first argument is)` that is in any directory above.

Radians To Degrees Conversion Function .

Converts the argument array from radians to degrees. The general syntax for its use is y = rad2deg(x)
Note that the output type will be the same as the input type, and that complex arguments are allowed. The output is not wrapped to [0,360).

Some known conversion factors
```--> rad2deg(1) % one radian is about 57 degrees ans = 57.2958 --> rad2deg(pi/4) % should be 45 degrees ans = 45 --> rad2deg(2*pi) % Note that this is 360 not 0 degrees ans = 360```

```f0 = 60;         %frequency (Hz)
w0 = f0*pi/180;  %natural frequency (rad)```

The conversion factor is not difficult, but it can be a workflow distraction nonetheless.

```radians(180)
ans =
3.1416

degrees(pi/3)
ans =
60```
• deg = rad./(pi/180);
• ad = pi.*deg./180 ;

Posted in error, Matlab

Tags: ,

### TomTom

BlueAsteroid

Just another WordPress.com site

Jing's Blog

Just another WordPress.com site

Start from here......

Just another WordPress.com site

Where On Earth Is Waldo?

A Project By Melanie Coles

the Serious Computer Vision Blog

A blog about computer vision and serious stuff

Cauthy's Blog

paper review...

Cornell Computer Vision Seminar Blog

Blog for CS 7670 - Special Topics in Computer Vision

datarazzi

Life through nerd-colored glasses

Luciana Haill

Brainwaves Augmenting Consciousness

1,2,∞

Dr Paul Tennent

and the university of nottingham

turn off the lights, please

A bunch of random, thinned and stateless thoughts around the Web