Displaying numbers explicitly?
显示 更早的评论
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?
采纳的回答
更多回答(1 个)
Steven Lord
2017-5-23
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
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!