Why did I get this error?

3 vues (au cours des 30 derniers jours)
Ender Rencuzogullari
Ender Rencuzogullari le 8 Mar 2016
Commenté : Steven Lord le 8 Mar 2016
I have completed my program about three months ago and it was working perfectly. My laptop was broken one month ago, so I have loaded Matlab R2013a again. Today, I got this error:
Undefined function 'deg2rad' for input arguments of type 'double'
Related line is:
rb = rp*cos(deg2rad(pre_ang));
where pre_ang is an input value, rb and rp are calculated by program.
Why is this happening now although it was not a problem before?
Thanks to contributers.

Réponses (1)

Ken Atwell
Ken Atwell le 8 Mar 2016
The function deg2rag was introduced in R2015b, according to the documentation. Could you have previously been using a newer version of MATLAB? Or, maybe you had downloaded a File Exchange contribution like this one?
  2 commentaires
Steven Lord
Steven Lord le 8 Mar 2016
DEG2RAD existed in Mapping Toolbox before it was moved into MATLAB in release R2015b (as documented in the Release Notes for Mapping Toolbox and for MATLAB for that release.) You probably had that toolbox installed before your laptop broke, or you had written your own version of that function.

Connectez-vous pour commenter.


En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by