이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
problem with columnWidth..how solve it
조회 수: 3 (최근 30일)
이전 댓글 표시
aldo
2023년 10월 22일
size(T)
ans =
73 9
T =
73×9 table
T.ColumnWidth={50,30,30,30,30,30,30,30,30}
Error using .
To assign to or create a variable in a table, the number of rows must match the height of the table.
댓글 수: 12
Dyuman Joshi
2023년 10월 22일
이동: Dyuman Joshi
2023년 10월 22일
The size of the data to be added to the table must be compatible with the dimensions of the table, which is what the error message (explicitly) states as well.
Use -
T.ColumnWidth = [50;30;30;30;30;30;30;30;30];
aldo
2023년 10월 22일
이동: Dyuman Joshi
2023년 10월 22일
Error using .
To assign to or create a variable in a table, the number of rows must match the height of the table.
Error in CaricaListaStrategie_Struct (line 60)
T.ColumnWidth=[50,30,30,30,30,30,30,30,30];
aldo
2023년 10월 22일
이동: Dyuman Joshi
2023년 10월 22일
Error using .
To assign to or create a variable in a table, the number of rows must match the height of the table.
Error in CaricaListaStrategie_Struct (line 60)
T.ColumnWidth=[50;30;30;30;30;30;30;30;30];
Dyuman Joshi
2023년 10월 22일
편집: Dyuman Joshi
2023년 10월 22일
I somehow mixed up the dimensions, Sorry.
The table has 73 rows, thus the data for ColumnWidth should have 73 rows as well.
Do you want to add the data related to a variable present in the column? Or is there a criteria/logic for adding that data?
Voss
2023년 10월 22일
이동: Voss
2023년 10월 22일
If you have a uitable (UIT) whose data is a table variable (T)
UIT = uitable(); % create a uitable (graphics object)
UIT.Data = T; % set the uitable's Data to be the table variable T
Then you can set the ColumnWidth of the uitable like this:
UIT.ColumnWidth = {50,30,30,30,30,30,30,30,30}; % UIT has 9 columns
However, using the same syntax on the table variable T tries to add a variable/column called "ColumnWidth" to the table T, which produces an error in this case because the number of values given doesn't match the number of rows of T.
T.ColumnWidth = {50,30,30,30,30,30,30,30,30} % T has 73 rows, so this doesn't work
답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)