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

8 vues (au cours des 30 derniers jours)
Luccas S.
Luccas S. le 5 Mai 2021
Commenté : Luccas S. le 5 Mai 2021
I know this is possible with 'format long'. But I wanted to specifically limit it to 5, is there any way to do that?

Réponse acceptée

Ayham Aljawabrah
Ayham Aljawabrah le 5 Mai 2021
Modifié(e) : Ayham Aljawabrah le 5 Mai 2021
Hello lucass!
Try, vpa
c=1/3
vpa(c,5)
  1 commentaire
Luccas S.
Luccas S. le 5 Mai 2021
It worked, but values ​​taken by the sqrt (x) function were left with 4 decimal places. Thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by