Unable to get sym(pi) to output Pi in matlab
21 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!