Short format display after using solve command
6 次查看(过去 30 天)
显示 更早的评论
Hi,
Although I have chosen the short format in the code and command window display preferences. The results after using a "solve" command are displayed as:
y =
7770/23 - (32083660183526053*R)/12947848928690176000
Can anybody help me so that I can view the numerical values in short format? Like:
y = 337.83 - 0.0024779*R
Thanks
0 个评论
采纳的回答
Walter Roberson
2012-8-10
Use vpa()
3 个评论
Gombo Choigaalaa
2018-9-29
编辑:Walter Roberson
2018-9-29
>> x=3^4/(2^3+2-4.5);
>> x=14.7273 -looks ok but not short.
>> vpa(x)
ans =
14.727272727272727272727272727273 -is not short at all LOL
Walter Roberson
2018-9-29
By default vpa() pays attention to the current digits() setting, which defaults to 32. You can specify how many digits you want at the time of the vpa() call. For example,
>> vpa(x,5)
ans =
14.727
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Numbers and Precision 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!