Displaying numbers explicitly?
Show older comments
I'd like MATLAB to display numbers explicitly whenever possible - that is to say, instead of a rounded decimal number, I want it to express the value using only whole numbers, such as 2+sqrt(5), pi/2 or e^3. If it can't do that out of the box, is there perhaps a plugin that lets me do that?
Accepted Answer
More Answers (1)
Steven Lord
on 23 May 2017
Symbolic Math Toolbox can do some of this and get you close in other scenarios.
>> five = sym(5);
>> x = 2 + sqrt(five)
x =
5^(1/2) + 2
>> y = sym(pi)/2
y =
pi/2
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!