Use the Lookup Table Editor
To manage the lookup tables in your environment, use the Lookup Table Editor. This editor lets you:
Visualize and edit lookup table data in a consistent way similar to a spreadsheet editor, regardless of the data source. A variable data source can be from the MATLAB® base workspace, model workspace, or data dictionary.
Explore lookup tables from multiple models, subsystems, and blocks loaded in the current MATLAB session.
Generate reports containing lookup table data and plots.
For 1-D data, the report generates line plots.
For more than 1-D data, the report generates surface plots, one plot for each 2-D slice of data.
Add custom lookup table blocks to the Lookup Table Editor, enabling you to work with them as you do other lookup table blocks.
This graphic is a view of the Lookup Table Editor for the Throttle
Estimation lookup table block in the Modeling a Fault-Tolerant Fuel Control System example
sldemo_fuelsys
model. For this view, the heatmap is enabled and
the mesh and contours for the data are plotted. Observe that the red dots in the plots
represent the data in the selected area of the blue rectangle in the tabular
area.
Start the Lookup Table Editor
Access the Lookup Table Editor in one of these ways:
In Simulink® Editor, from the Modeling tab, click Lookup Table Editor. From this interface, you can open the Lookup Table Editor for Simulink, AUTOSAR Blockset, and Simscape™ lookup table blocks. The Lookup Table Editor can also open for empty models. If you have registered your own custom lookup table blocks, the Lookup Table Editor recognizes them also.
From these Simulink blocks : 1-D Lookup Table, 2-D Lookup Table, Direct Lookup Table (n-D), n-D Lookup Table, Interpolation Using Prelookup, and Prelookup, click the edit lookup table button.
From these AUTOSAR Blockset blocks: Curve (AUTOSAR Blockset), Curve Using Prelookup (AUTOSAR Blockset), Map (AUTOSAR Blockset), and Map Using Prelookup (AUTOSAR Blockset), click the edit lookup table button.
In the MATLAB Command Window, type
lookupTableEditor
.In Simulink Editor, click a Simulink or AUTOSAR Blockset lookup table block. In the Lookup Table tab that appears, click Lookup Table Editor.
Lookup Table Editor enables you to:
Enter the path to models and subsystems that contain lookup table blocks, and lookup table blocks themselves in the lookup table path browser to see them in the list in the Lookup Table Blocks path pane.
In the tabular area, the Lookup Table Editor contains the same lookup table spreadsheet as is available through the
Simulink.LookupTable
property dialog box (Edit Lookup Table Data with Lookup Table Spreadsheet).Generate line, plot, surface, and contour plots for the data.
Enable heatmap overlays for data.
Lookup Table Editor Limitations
Lookup Table Editor does not support lookup tables containing data specified as
Simulink.VariantVariable
. When you try to open a lookup table that contains this data type, the lookup table block returns an error in a pop-up window .Lookup Table Editor overwrites the string set in the block dialog if it is a pure structure field reference.
If the Lookup Table Editor has a data source that is specified more than once, for example, if the same model workspace variable myVar is used for both breakpoints and table, the entire lookup table is read-only.
If the lookup table contains data passed in through a model argument, Lookup Table Editor treats the local model variable as the data source.
Lookup Table Editor supports report generation only for the n-D Lookup Table, 1-D Lookup Table, n-D Lookup Table, Interpolation Using Prelookup, Prelookup, and Direct Lookup Table n-D blocks.
Lookup Table Editor does not support runtime tunability of parameters.
See Also
1-D Lookup Table | 2-D Lookup Table | Direct Lookup Table (n-D) | n-D Lookup Table | Interpolation Using Prelookup | Prelookup