math - How can I get MATLAB to display radians in terms of pi? -


i trying make programme convert cartesian coordinates polar coordinates.

my calculator returns arctan(1) pi/4.

matlab on other hand returns atan(1) 0.7854.

how can matlab return numbers expressions of pi?

for particular values of pi can use symbolic numbers, example:

atan(sym(1)) ans = pi/4  asin(sym(3^.5/2)) ans = pi/3 

note requires symbolic math toolbox.

hope helps,

qapla'


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -