I wanted the matlab to show 5 places after the comma.

1 次查看(过去 30 天)
I know this is possible with 'format long'. But I wanted to specifically limit it to 5, is there any way to do that?

采纳的回答

Ayham Aljawabrah
Ayham Aljawabrah 2021-5-5
编辑:Ayham Aljawabrah 2021-5-5
Hello lucass!
Try, vpa
c=1/3
vpa(c,5)
  1 个评论
Luccas S.
Luccas S. 2021-5-5
It worked, but values ​​taken by the sqrt (x) function were left with 4 decimal places. Thanks

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scope Variables and Generate Names 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by