How to change base for angle representation in Matlab?

Status
Not open for further replies.

alitavakol

Member level 2
Joined
Dec 1, 2005
Messages
47
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Location
Iran
Activity points
1,653
mycos(x) matlab

how to change base for angle representation? to get cos(360°) = 1? and work with it permanently?
 

Matlab

it is easier to write a function of your own like this:

function y=mycos(x);
y=cos(x/180*pi);

Since cos is a built-in function that you cannot change its source code, another way may be to name the function above as cos and put it in your "work" folder, generally the m file with the same name in the work folder will be called first.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…