メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

setColWidth

モデル アドバイザー解析結果のテーブルの列幅を指定

    説明

    setColWidth(tableObj,column,relativeWidth) は、モデル アドバイザーの結果のテーブルの列幅を指定します。

    すべて折りたたむ

    sl_customization ファイル内のチェック コールバック関数で setColWidth を使用してモデル アドバイザーの結果のテーブルの列幅を指定します。

    チェック コールバック関数内で、テーブルを返すようにチェック結果をカスタマイズできます。この例では、テーブルの最初の列は既定の幅になっています。2 番目の列の幅は最初の列の 2 倍です。3 番目の列の幅は最初の列の 3 倍です。

    % Create table for displaying results
    numRows = 1;
    numCols = 3;
    table = ModelAdvisor.Table(numRows,numCols);
    
    % Fill in table with example entries
    setEntry(table,1,1,'entry 1');
    setEntry(table,1,2,'entry 2');
    setEntry(table,1,3,'entry 3');
    
    % Specify widths of columns in table
    setColWidth(table,1,1); % set column 1 to the default width
    setColWidth(table,2,2); % make column 2 twice as wide as column 1
    setColWidth(table,3,3); % make column 3 three times as wide as column 1

    入力引数

    すべて折りたたむ

    モデル アドバイザーの結果のテーブル。ModelAdvisor.Table オブジェクトとして指定します。

    テーブルの列。整数として指定します。

    例: 2

    列の相対的な幅。整数として指定します。

    列の幅はテーブル全体の幅を基準とした相対的な幅です。たとえば、次のコードでは、2 番目の列の幅は最初の列の 2 倍、3 番目の列の幅は最初の列の 3 倍になります。

    setColWidth(table,1,1); % set column 1 to the default
    setColWidth(table,2,2); % make column 2 twice as wide as column 1
    setColWidth(table,3,3); % make column 3 three times as wide as column 1
    既定では、ModelAdvisor.Table の列の relativeWidth1 です。

    例: 3