| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simscape |
| Contents | Index |
| Learn more about Simscape |
Physical Signals/Lookup Tables

The PS Lookup Table (2D) block computes an approximation to some function z=f(x,y) given the x, y, z data points. The two inputs and the output are physical signals.
The x and y data vectors must be strictly monotonically increasing (i.e., the value of the next element in the vector is greater than the value of the preceding element). The matrix size of the tabulated function values must match the dimensions defined by the input vectors.
You define the lookup table by specifying the Vector of input values along X-axis parameter as a 1-by-m vector of x data points, the Vector of input values along Y-axis parameter as a 1-by-n vector of y data points, and the Tabulated function values as an m-by-n matrix of z data points. The block works on Cartesian mesh, i.e., function values must be specified at vertices of a rectangular array. The block generates output based on the input grid lookup using the selected interpolation and extrapolation methods. You have a choice of three interpolation methods and two extrapolation methods.

Specify the vector of input values along the x-axis as a tabulated 1-by-m array. The input values vector must be strictly monotonically increasing. The values can be non-uniformly spaced.
Specify the vector of input values along the y-axis as a tabulated 1-by-n array. The input values vector must be strictly monotonically increasing. The values can be non-uniformly spaced.
Specify the output values as a tabulated m-by-n matrix, defining the function values at the input grid vertices. The matrix size must match the dimensions defined by the input vectors.
Select one of the following interpolation methods for approximating the output value when the input value is between two consecutive grid points:
Linear — Uses a bilinear interpolation algorithm, which is an extension of linear interpolation for functions in two variables. The method performs linear interpolation first in x-direction and then in y-direction.
Cubic — Uses the bicubic interpolation algorithm described in [1].
Spline — Uses the bicubic spline interpolation algorithm described in [1].
Select one of the following extrapolation methods for determining the output value when the input value is outside the range specified in the argument list:
From last 2 points — Extrapolates using the linear method (regardless of the interpolation method specified) based on the last two output values at the appropriate grid location, similar to PS Lookup Table (1D) block.
From last point — Uses the last specified output value at the appropriate grid location, similar to PS Lookup Table (1D) block..
The block has two physical signal input ports and one physical signal output port.
[1] W.H.Press, B.P.Flannery, S.A.Teulkolsky, W.T.Wetterling, Numerical Recipes in C: The Art of Scientific Computing, Cambridge University Press, 1992
![]() | PS Lookup Table (1D) | PS Math Function | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |