Unable to get sym(pi) to output Pi in matlab
1 view (last 30 days)
Show older comments
I am unable to use sym(pi) to provide pi as an output.
syms n positive integer
syms x real
Pi = sym(pi);
a0 = 1/Pi * int(x, 0, Pi)
The output runs as
1.5708
This code ran on friend's laptop giving π/2 as output. What could be the reason?
1 Comment
Answers (1)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!