필터 지우기
필터 지우기

how to write number into uitable?

조회 수: 1 (최근 30일)
best16 programmer
best16 programmer 2017년 5월 22일
댓글: Jan 2017년 5월 22일
hello, i have a uitable in a gui application and i want to write a number such as:
x=x0±0.01
with x0 is a number,can you help me with that?
thank you

채택된 답변

Jan
Jan 2017년 5월 22일
편집: Jan 2017년 5월 22일
"x=x0±0.01" is not a number. You can write this as a string only. Then you can parse the strings when the data are used.
  댓글 수: 2
best16 programmer
best16 programmer 2017년 5월 22일
thank you,but the x0 is a number. can you please show me an example
Jan
Jan 2017년 5월 22일
What about Star Strider's example? I still do not know, what you want to achieve.

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

추가 답변 (1개)

Star Strider
Star Strider 2017년 5월 22일
I would use sprintf to create ‘x’:
x = sprintf('%.2f±0.01', x0);
Change it if necessary to create the result you want.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by