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
Post a Comment