How to sorten the result value depicted on text area
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
NAVNEET NAYAN
2023년 9월 12일
편집: NAVNEET NAYAN
2023년 9월 12일
you can use "round" function.
See it's documentation (https://in.mathworks.com/help/releases/R2022b/matlab/ref/round.html?s_tid=doc_srchtitle).
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.
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!