How to sorten the result value depicted on text area

1 visualizzazione (ultimi 30 giorni)
hello, please help me.
the result of my calculation which is presented on "text area" is too long. i wanna shorten it at least to have one digit decimal. how can i do that? thanks

Risposta accettata

NAVNEET NAYAN
NAVNEET NAYAN il 12 Set 2023
Modificato: NAVNEET NAYAN il 12 Set 2023
you can use "round" function.
I think that might also help.
Like
Min_diameter=0.56616
Min_diameter=round(Min_diameter,N);
N in your case will be 1, as you are looking for one digit decimal place.

Più risposte (1)

KSSV
KSSV il 12 Set 2023
REad about fprintf, sprintf
  1 Commento
Amron
Amron il 12 Set 2023
thanks for your answer brother. it is a new knoledge for learning those commands

Accedi per commentare.

Categorie

Scopri di più su Startup and Shutdown in Help Center e File Exchange

Tag

Prodotti


Release

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by