This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

setColTitles

Class: ModelAdvisor.FormatTemplate
Package: ModelAdvisor

Add column titles to table

Syntax

setColTitles(ft_obj, {col_title_1, col_title_2, ...})

Description

setColTitles(ft_obj, {col_title_1, col_title_2, ...}) is method you must use when you create a template object that is a table type. Use it to specify the titles of the columns in the table.

Note

Before adding data to a table, you must specify column titles.

Input Arguments

ft_obj

A handle to a template object.

col_title_N

A cell of character vectors or handles to formatting objects, specifying the column titles.

Valid formatting objects are: ModelAdvisor.Image, ModelAdvisor.LineBreak, ModelAdvisor.List, ModelAdvisor.Paragraph, ModelAdvisor.Table, and ModelAdvisor.Text.

The order of the col_title_N inputs determines which column the title is in. If you do not add data to the table, the Model Advisor does not display the table in the result.

Examples

Create a table object, ft, and specify two column titles:

ft = ModelAdvisor.FormatTemplate('TableTemplate');
setColTitles(ft, {'Index', 'Block Name'});