Main Content

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

ModelAdvisor.Table

Model Advisor 결과에 대한 테이블 생성

설명

ModelAdvisor.Table 개체는 Model Advisor 결과에서 테이블을 생성하고 형식을 지정합니다. 테이블 제목과 테이블 머리글 행을 제외하고 테이블의 행과 열 수를 지정합니다.

생성

설명

예제

table = ModelAdvisor.Table(row,column)은 사용자가 지정한 행과 열 수를 포함하는 테이블 개체를 생성합니다.

입력 인수

모두 확장

Model Advisor 결과 테이블에 생성할 행 수입니다.

Model Advisor 결과 테이블에 생성할 열 수입니다.

객체 함수

getEntryModel Advisor 분석 결과의 테이블에서 셀 내용 가져오기
setColHeadingModel Advisor 분석 결과 테이블의 열 제목 지정
setColHeadingAlign열 제목 정렬 지정
setColHeadingValign열 제목 수직 정렬 지정
setColWidth열 너비 지정
setEntriesModel Advisor 분석 결과에 테이블 내용 지정
setEntryModel Advisor 분석 결과 테이블의 내용 셀 지정
setEntryAlignModel Advisor 분석 결과에서 테이블의 셀 정렬 지정
setEntryValign테이블 셀 수직 정렬 지정
setHeadingModel Advisor 분석 결과에 테이블 제목 지정
setHeadingAlign표 제목 정렬 지정
setRowHeading테이블 행 제목 지정
setRowHeadingAlign테이블 행 제목 정렬 지정
setRowHeadingValign테이블 행 제목 수직 정렬 지정

예제

모두 축소

Model Advisor 결과에 표시될 테이블을 만듭니다. 이 테이블에는 무작위로 생성된 숫자가 포함된 5개의 행과 5개의 열이 있습니다.

콜백 함수에는 다음 MATLAB® 코드를 사용하세요. Model Advisor는 결과에 table1를 표시합니다.

matrixData = rand(5,5) * 10^5;

% Initialize a table with 5 rows and 5 columns (heading rows not counting).
table1 = ModelAdvisor.Table(5,5);

% Set column headings
for n=1:5
    table1.setColHeading(n, ['Column ', num2str(n)]);
end

% Center the second column heading
table1.setColHeadingAlign(2, 'center');

% Set column width of the second column
table1.setColWidth(2, 3);
 
% Set the row headings
for n=1:5
    table1.setRowHeading(n, ['Row ', num2str(n)]);
end

% Enter table content
for rowIndex=1:5
    for colIndex=1:5
        table1.setEntry(rowIndex, colIndex, ...
            num2str(matrixData(rowIndex, colIndex)));
        
        % set alignment of entries in second row
        if colIndex == 2
            table1.setEntryAlign(rowIndex, colIndex, 'center');
        end
    end
end

% Overwrite the content of cell 3,3 with a ModelAdvisor.Text  object
text = ModelAdvisor.Text('Example Text'); 
table1.setEntry(3,3, text)

The table "table1" with the text 'Example Text' in Row 3 Column 3

버전 내역

R2006b에 개발됨