필터 지우기
필터 지우기

how to match the dimensions of two columns in a table

조회 수: 3 (최근 30일)
MAHMOUD ALZIOUD
MAHMOUD ALZIOUD 2018년 4월 3일
댓글: MAHMOUD ALZIOUD 2018년 4월 3일
Dear all, I am truing to build a table with 2 columns in MATLAB, the 1st column is the month (from 1 to 12), the second column is the day in this month (from 1 to 30), so each cell in the month column will correspond to 30 cells in the day column, MATLAB does not do that because the dimension of the 2 column must be the same, how can I please repeat the number 1 in month 3o times?

채택된 답변

Walter Roberson
Walter Roberson 2018년 4월 3일
YourTable = cell2table( [num2cell(1:12).', repmat({(1:30).'}, 12, 1)], 'VariableNames', {'Month', 'Days'});

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by