필터 지우기
필터 지우기

Set numbers behind the comma in text edit view on gui matlab?

조회 수: 1 (최근 30일)
Yuli Hartini
Yuli Hartini 2017년 5월 10일
댓글: Yuli Hartini 2017년 5월 12일
Im trying to display some output value from my calculations to an edit text box in my GUI window. I want to set 4 numbers behind the comma in text edit view. How I can do that?
  댓글 수: 1
Stephen23
Stephen23 2017년 5월 10일
It is easy to set the format using num2str or sprintf.
What have you tried so far?

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2017년 5월 11일
set(handles.edit1, 'String', sprintf('%.4f', pi))

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by