Main Content

Simulink.dialog.LookuptableControl class

Package: Simulink.dialog

Control mask lookup tables programmatically

Description

Create an instance of Simulink.dialog.LookupTableControl to add values for table and breakpoints data in the lookup table control.

Properties

expand all

Public Properties

Specifies unique name for the LUT control.

Data Types: String

Specifies the text displayed on the lookup table control.

Data Types: String

Specifies whether dialog control is placed on the current row or on a new row.

Data Types: Character vector

Indicates whether lookup table control is active on the mask dialog box.

Data Types: Logical

Indicates whether lookup table control is displayed on the mask dialog box.

Data Types: Logical

Indicates if lookup table control gets resized along with the dialog.

Data Types: Logical

Tool tip text for the lookup table control.

Data Types: String

A class that holds the properties of table data.

Data Types: String

A class that holds the properties of an array of breakpoint data.

Data Types: String

Specifies the name of the Simulink.LookupTable object in the base workspace or model workspace that holds the table and breakpoint data.

Data Types: String

Indicates if the table and breakpoints data is specified explicitly or through a lookup table object.

Data Types: String

Examples

Add Table and Breakpoint Data

% LUT widget – Use of mask parameters 
% Get mask object
>> maskObj = Simulink.Mask.get(blkhndl);
 
% Add table data and breakpoint parameters to mask
>> bp1 = maskObj.addParameter('Name', 'torque', 'Prompt’, 'Torque:', 'Type',  'edit');
>> bp2 = maskObj.addParameter('Name', 'speed', 'Prompt', 'Engine speed:', 'Type',  'edit');
>> table = maskObj.addParameter('Name', 'fuelflowtable', 'Prompt', 'Fuel Flow Map:', 'Type',  'edit');

% Add lookup table dialog control
>> lutControl = maskObj.addDialogControl('Name', 'fuelflowlut', 'Type', 'lookuptablecontrol');
>> lutControl.Table = 'fuelflowtable';
>> lutControl.TableUnit = 'kg/s';
>> lutControl.BreakPoints = {'torque', 'speed'};
>> lutControl.BreakPointUnits = {'Nm', 'rpm'};

% Set_param/get_param on individual parameters
>> set_param(gcb, 'table', [0 0 0 0 0;0 0.00016698494399207 0.000215658653290937 0.000275871933319691
 0.000336081948151398;0 0.000213100798708477 0.000291370180114204 0.000369306019581262 0.0004465428818031;
0 0.000267803260011858 0.000364396694333504 0.00046262212716372 0.000558065834783092;0 0.000322772832814776 
0.00043943929392966 0.000556792164345244 0.000676348769394681;0 0.000379719832221723 0.000514675497107671 
0.000650629392939912 0.000787914000718505;0 0.000452854103193057 0.00059153462628563 0.000746324407771482 0.000901247799650874]);
>> set_param(gcb, 'bp1',[0;750;1053.57142857143;1357.14285714286;1660.71428571429] );
Introduced in R2021b