setColWidth
Specify column widths for table in Model Advisor analysis results
Description
setColWidth(
specifies the widths of columns for a table in Model Advisor
results.tableObj
,column
,relativeWidth
)
Examples
Specify Column Widths for Table of Model Advisor Results
Specify column widths for a table in your
Model Advisor results by using
setColWidth
in a check callback
function in your sl_customization
file.
Inside your check callback function, you can customize the check results to return a table. In this example, the first column of the table has the default width. The second column is twice as wide as the first column. The third column is three times as wide as the first column.
% 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
Input Arguments
tableObj
— Table of Model Advisor results
ModelAdvisor.Table
object
Table of Model Advisor results, specified as a ModelAdvisor.Table
object.
column
— Column of table
integer
Column of the table, specified as an integer.
Example: 2
relativeWidth
— Relative width of column
integer
Relative width of column, specified as an integer.
The column width is relative to the width of the entire table. For example, this code makes the second column twice as wide as the first column and the third column three times as wide as the first column:
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
have a
relativeWidth
of
1
.
Example: 3
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)