필터 지우기
필터 지우기

uitable ColumnFormat is ignored?

조회 수: 26 (최근 30일)
Ali Komai
Ali Komai 2019년 8월 29일
답변: Ali Komai 2019년 9월 3일
I have an uitable and want one of its columns be shown with just 2 digits (100,35 for example). I tried using the property ColumnFormat to get this done like this:
uitable(myfigure,'Data',mydata,'ColumnFormat',{[],[],[],'bank'}) % I want to change the format of the 4th column
Sadly this is simply ignored and the column is shown as usual with 4 digits. Issueing "format bank" before creating the table doesn't have any effect either, always 4 digits.
I'm aware that I could round the values in my table but I don't want that. I just want to change the displayformat.
  댓글 수: 1
Ali Komai
Ali Komai 2019년 9월 2일
In my desperation I now tried to round the values in the table (what I initially didn't want) but this doesn't help either. Then trailing zeros will be displayed (like 100,3500).
Any help would be appreciated.

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

채택된 답변

Ali Komai
Ali Komai 2019년 9월 3일
The problem is solved by passing the data to the uitable function in form of a cell-array instead of a table.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Timing and presenting 2D and 3D stimuli에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by