Main Content

Plot Lookup Tables

You can plot lookup table data specified for the PS Lookup Table (1D) and PS Lookup Table (2D) blocks in your model. Plotting the tables lets you visualize the data before simulating the model, to make sure that the table is correct. The plots reflect tabulated data specified for the block, as well as the selected interpolation and extrapolation options.

If you change the underlying table data, plotting it again opens a new window. This way, you can compare the plots side by side and see how the block parameter values affect the resulting lookup function.

  1. Create a new model and add a PS Lookup Table (1D) block. Specify the block parameters as shown.

  2. Right-click the block in your model. From the context menu, select Foundation Library > Plot Table.

    A figure window containing the plot of the data opens.

  3. In the block dialog box, change the Interpolation method parameter value to Smooth.

  4. Plot the data again by right-clicking the block and selecting Foundation Library > Plot Table.

    A new figure window opens.

    The curve shape has changed because of the new interpolation method.

  5. In the block dialog box, change the Extrapolation method parameter value to Nearest.

  6. Plot the data again by right-clicking the block and selecting Foundation Library > Plot Table.

    A new figure window opens.

    The curve shape within the table grid (between 1 and 5 along the x-axis) has not changed, but the new extrapolation method affects how the curve continues outside the specified range.

    Note

    If you change the Extrapolation method parameter value to Error, there is no extrapolation region and the plot gets cut off at the first and last grid points.

See Also

|