필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Ho to reduce the table to 1dim?

조회 수: 1 (최근 30일)
Nimrodb
Nimrodb 2013년 2월 13일
마감: MATLAB Answer Bot 2021년 8월 20일
I use the GUIDE option and placed a table.
The table size is 4×6.
I want to have it 1×6 -> I tried to delete the extra rows with no success. It keep on returning them when I press Apply/OK
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 13일
How did you do that?
Nimrodb
Nimrodb 2013년 2월 13일
I added a table with the GUI tool - the default is 4x2
How do i reduce it to 1x2 for ex.?

답변 (1개)

Sean de Wolski
Sean de Wolski 2013년 2월 13일
A uitable's size is determined by the size of its 'Data' property. So change that:
h = uitable('Data',rand(4,6));
%%To Reduce it:
set(h,'Data',1:6)
  댓글 수: 7
Nimrodb
Nimrodb 2013년 2월 20일
Sean - because I wanted to reduce a table - not add cells to it. As you can see from my prev' comment - the cell type when using your format gave me NaN values ([]) and not cell ('') or whatever this format is
Sean de Wolski
Sean de Wolski 2013년 2월 20일
So
repmat({''},1,6)
?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by