what does format short in a matlab code do??

24 Ansichten (letzte 30 Tage)
ad lyn
ad lyn am 29 Nov. 2021
Kommentiert: ad lyn am 29 Nov. 2021

Akzeptierte Antwort

DGM
DGM am 29 Nov. 2021
Bearbeitet: DGM am 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.

Weitere Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by