Contenido principal

ModelAdvisor.Check.setInputParametersLayoutGrid

R2026b

Specify layout grid for input parameters

Description

setInputParametersLayoutGrid(check_obj, [row col]) sets the layout grid dimensions for displaying input parameters in the check object check_obj.

Examples

collapse all

This example shows how to specify the layout grid for input parameters in a custom Model Advisor check.

Create a Model Advisor check object.

rec = ModelAdvisor.Check('com.mathworks.mySampleCheck');
rec.Title = 'Example: Input Parameters Layout Grid';
rec.TitleTips = 'Demonstrates setInputParametersLayoutGrid usage';

Set the layout grid to two rows and two columns.

setInputParametersLayoutGrid(rec,[2 2]);

Define input parameters.

inputParam1 = ModelAdvisor.InputParameter;
inputParam1.Name = 'Enable Option';
inputParam1.Type = 'Bool';
inputParam1.Value = true;
inputParam1.Description = 'Toggle to enable option';

inputParam2 = ModelAdvisor.InputParameter;
inputParam2.Name = 'Threshold';
inputParam2.Type = 'String';
inputParam2.Value = '10';
inputParam2.Description = 'Set the threshold value';

Assign the input parameters to the check object.

setInputParameters(rec,{inputParam1, inputParam2});

Input Arguments

collapse all

Model Advisor check object, specified as a ModelAdvisor.Check object.

Specifies the number of rows in the layout grid for displaying input parameters in the Model Advisor.

Example: 2

Specifies the number of columns in the layout grid for displaying input parameters in the Model Advisor.

Example: 2

Version History

Introduced in R2008a