Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

How to change base for angle representation in Matlab?

Status
Not open for further replies.

alitavakol

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

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

jacobus

Newbie level 5
Joined
Jan 11, 2006
Messages
9
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,376
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top