Why is Symbolic Math Toolbox Giving Decimal Answers?
1 view (last 30 days)
Show older comments
When I ask symbolic math toolbox for symbolic outputs, it gives them in a decimal, but symbolic. I would like sym(pi) to give π and sym(sqrt(3)) to give
. I've set my path to default and typed the command "reset(symengine)" and the commands "restoredefaultpath; rehash toolboxcache;" I've deleted and redownloaded both Matlab and the Symbolic toolbox. Any help is appreciated.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1501580/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1501585/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1501580/image.png)
0 Comments
Accepted Answer
Paul
on 4 Oct 2023
Check your sympref
The defaults are
sympref
Resulting in
[sym(pi) sym(sqrt(3))]
But, if you change this pref
sympref('FloatingPointOutput',true);
sympref
then
[sym(pi) sym(sqrt(3))]
0 Comments
More Answers (1)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!