Edit Lookup Tables

You can edit a lookup table using:

  • Lookup Table block dialog box

  • Lookup Table Editor

To edit the lookup table in a block:

  1. Open the subsystem that contains the lookup table block.

  2. Open the lookup table block’s dialog box.

  3. In the Table and Breakpoints tab, edit the Table data and relevant Breakpoints parameters as needed.

With the Lookup Table Editor, you can skip these steps and edit the desired lookup table without navigating to the block that uses it. However, you cannot use the Lookup Table Editor to change the dimensions of a lookup table. You must use the block parameter dialog box for this purpose.

Edit N-Dimensional Lookup Tables

If the lookup table of the block currently selected in the Lookup Table Editor tree view has more than two dimensions, the table view displays a two-dimensional slice of the lookup table.

The Dimension Selector specifies which slice currently appears and lets you select another slice. The selector consists of a 2-by-N array of controls, where N is the number of dimensions in the lookup table. Each column corresponds to a dimension of the lookup table. The first column corresponds to the first dimension of the table, the second column to the second dimension of the table, and so on. The Dimension size row of the selector array displays the size of each dimension. The Select 2-D slice row specifies which dimensions of the table correspond to the row and column axes of the slice and the indices that select the slice from the remaining dimensions.

To select another slice of the table, specify the row and column axes of the slice in the first two columns of the Select 2-D slice row. Then select the indices of the slice from the pop-up index lists in the remaining columns.

For example, the following selector displays slice (:,:,1) of a 3-D lookup table, as shown under Dimension Selector in the Lookup Table Editor.

To transpose the table display, select the Transpose display check box.

Edit Custom Lookup Table Blocks

You can use the Lookup Table Editor to edit custom lookup table blocks that you have created. To do this, you must first configure the Lookup Table Editor to recognize the custom lookup table blocks in your model.

  1. Select File > Configure. The Lookup Table Blocks Type Configuration dialog box appears.

    The dialog box displays a table of the lookup table block types that the Lookup Table Editor currently recognizes. This table includes the standard blocks. Each row of the table displays key attributes of a lookup table block type.

  2. Click Add on the dialog box. A new row appears at the bottom of the block type table.

  3. Enter information for the custom block in the new row under these headings.

    Field NameDescription

    Block type

    Block type of the custom block. The block type is the value of the block's BlockType parameter.

    Mask type

    Mask type of the custom block. The mask type is the value of the block's MaskType parameter.

    Breakpoint name

    Names of the block parameters that store the breakpoints.

    Table name

    Name of the block parameter that stores the table data.

    Number of dimensions

    Leave empty.

    Explicit dimensions

    Leave empty.

  4. Click OK.

To remove a custom lookup table block type from the list that the Lookup Table Editor recognizes, select the custom entry in the table of the Lookup Table Blocks Type Configuration dialog box and click Remove. To remove all custom lookup table block types, select the Use Simulink default lookup table blocks list check box at the top of the dialog box.

Related Topics