Main Content

Simulink.dialog.LookupTableControl Class

Namespace: Simulink.dialog

Control mask lookup tables programmatically

Since R2021b

Description

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

Properties

expand all

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

collapse all

new_system('LUTexample');
add_block('built-in/subsystem','LUTexample/subsystem');
save_system;
open_system('LUTexample');
maskObj = Simulink.Mask.create(gcb);
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');
lutControl = maskObj.addDialogControl('Name', 'fuelflowlut', 'Type', 'lookuptablecontrol');
lutControl.Table.Name = 'fuelflowtable';
lutControl.Table.Unit = 'kg/s';
lutControl.Breakpoints(1).Name = 'torque';
lutControl.Breakpoints(1).Unit ='Nm';
lutControl.Breakpoints(1).FieldName = 'Torque';
lutControl.Breakpoints(2).Name = 'speed';
lutControl.Breakpoints(2).FieldName = 'Speed';
save_system;

Version History

Introduced in R2021b