Filter löschen
Filter löschen

How to sorten the result value depicted on text area

1 Ansicht (letzte 30 Tage)
Amron
Amron am 12 Sep. 2023
Kommentiert: NAVNEET NAYAN am 13 Sep. 2023
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

Akzeptierte Antwort

NAVNEET NAYAN
NAVNEET NAYAN am 12 Sep. 2023
Bearbeitet: NAVNEET NAYAN am 12 Sep. 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.
  2 Kommentare
Amron
Amron am 12 Sep. 2023
thanks for your answer. it is simple and helpful

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Tags

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by