Direct Lookup Table (n-D)
Indexing an n-dimensional table to obtain a scalar, vector, or two-dimensional matrix.
Description
Block Direct Lookup Table (n-D) indexes an n-dimensional table to extract a scalar, vector, or two-dimensional matrix. The first index of the selection corresponds to the top (or left) input port. You can specify the table data as the block input or define the table data in the block dialogue box. The number of input ports and the output size depend on the number of table dimensions and the selected output slice.
The block Direct Lookup Table (n-D) supports character sizes.
Inputs and outputs of the block
Block Direct Lookup Table (n-D) uses inputs as indices in an n-dimensional table (counting from zero). The number of inputs depends on the dimensionality of the output signal: scalar, vector or two-dimensional matrix.
The parameters Table data sets the set of output values. The first input sets the index on the table dimension, which is one higher than the dimension of the output signal (counting from zero). The next input sets the index to the next table dimension, and so on.
Output signal | Output dimension | Table dimension corresponding to the first input |
---|---|---|
Scalar |
0 |
1 |
Vector |
1 |
2 |
Matrix |
2 |
3 |
Suppose that we need to select a vector of values from a four-dimensional table. The following dependence of the table dimension on the block input port applies:
The input port … | indexes the … table dimension |
---|---|
1 |
2 |
2 |
3 |
3 |
4 |
Ports
Output
#
OUT_1
—
output signal
scalar
| vector
| matrix
Details
Output signal as a scalar, vector or two-dimensional matrix. The output data size is determined by setting the parameters Inputs select this object from table. Output data type coincides with the table data type.
Data types |
|
Complex numbers support |
Yes |
Input
#
Port_1
—
index i1 of input values
scalar
| vector
| matrix
Details
The first input is a port that specifies an index on the dimension of the table that is one higher than the dimension of the output signal (counting from zero). The next input port sets the index to the zero dimension of the next table, and so on. All input value indices must be real.
Data types |
|
Complex numbers support |
Yes |
#
Port_N
—
index of N input values
scalar
| vector
Details
Nth input port, specifying an index on the dimensionality of the table, which is one higher than the dimensionality of the output signal (counting from zero). The number of inputs depends on the dimensionality of the output signal. All indices of input values must be real.
Data types |
|
Complex numbers support |
Yes |
Parameters
Table data
#
Number of table dimensions —
number of table measurements
Real number
Details
Sets the number of dimensions of the table.
This value defines the number of independent variables for the table and the number of block inputs.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Table data —
defining the output value table
Scalar / array of real and/or complex numbers
Details
Specify the table of output values. The size of the table must correspond to the value of the parameters Number of table dimensions.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
Algorithm
#
Inputs select this object from table —
output dimension
Element
| Vector
| 2-D Matrix
Details
Specify the dimensionality of the output signal: scalar, vector or two-dimensional matrix.
The number of input ports for indexes depends on the value of this parameters.
-
Element
- parameter value Number of table dimensions -
Vector
- parameter value Number of table dimensions − 1 -
2-D Matrix
- parameter value Number of table dimensions − 2
For example, for a four-dimensional table:
To access… | Specify… | How in… |
---|---|---|
Scalar |
Four indexes |
|
Vector |
Three indices |
|
Two-dimensional matrix |
Two indices |
|
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Diagnostic for out-of-range input —
block behaviour when out of range
None
| Warning
| Error
Details
The out-of-range behaviour of the unit is defined as follows:
-
None
- does not display a warning or error. -
Warning
- displays a warning and continues the simulation. -
Error
- displays an error and aborts the simulation.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |