what does format short in a matlab code do??

24 vues (au cours des 30 derniers jours)
ad lyn
ad lyn le 29 Nov 2021
Commenté : ad lyn le 29 Nov 2021

Réponse acceptée

DGM
DGM le 29 Nov 2021
Modifié(e) : DGM le 29 Nov 2021
It just changes the display format used when numbers are printed to console.
format long
pi
ans =
3.141592653589793
format short
pi
ans = 3.1416
There are other options. See help format for more info. I should point out though that it's strictly a display formatting tool. The numbers themselves aren't changed.

Plus de réponses (0)

Catégories

En savoir plus sur Modeling dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by