1D Lookup table
Description of the one dimensional lookup table component, which creates a vector a lookuptable of 100 data points based on the defined input and output.
Component Icon
Description
1D Lookup table generates an output signal by interpolating based on a given data set and input value. The Input values x property must be a strictly increasing or decreasing array.
 An example of an equidistant distribution of input values would be: in_vec_x = [2, 1, 0, 1, 2];
 An example of a nonequidistant distribution of input values would be: in_vec_x = [4, 0, 2, 3, 10]
The table output can be calculated using the equidistant space method or the nonequidistant (binary search) implementation method.
When the input vector (Input values x) has a nonequidistant distribution and the equidistant space method is selected, an internal conversion from nonequidistant to equidistant distribution is done. In this case, a warning is displayed during compilation.
 If the extrapolation method is clipping output, the value returned on the output will be the first value of the output vector f(x), provided that the input value is less than the first value of input vector. If the input value is greater than the last value of the input vector, the value returned on the output will be the last value of the output vector.
 If the extrapolation method is Linear, a line between the first or last values of the output vector f(x) is traced, depending on whether the input value is less than the first or greater than the last values of output vector. The linear extrapolation method returns the value of the generated line corresponding to the input.
The following example illustrates the difference between equidistant and nonequidistant implementation, and linear and clip extrapolation.
Equidistant and Clip Input value x = [1, 2, 3, 4, 5] f(x) = [10, 20, 30, 40, 50] 
Equidistant and Linear Input value x = [1, 2, 3, 4, 5] f(x) = [10, 20, 30, 40, 50] 

x  f(x)  x  f(x)  
0  0  0  0  
0.5  0  0.5  5  
1  10  1  10  
2  20  2  20  
3.6  36  3.6  36  
4.7  47  4.7  47  
5  50  5  50  
5.8  50  5.8  58  
6.7  50  6.7  67 
Nonequidistant and Clip Input value x = [1, 1.5, 3, 4.2, 5] f(x) = [10, 20, 30, 40, 50] 
Nonequidistant and Linear Input value x = [1, 1.5, 3, 4.2, 5] f(x) = [10, 20, 30, 40, 50] 

x  f(x)  x  f(x)  
0  0  10  10  
0.5  10  0.5  0  
1  10  1  10  
2  23.33  2  23.33  
3.6  35  3.6  35  
4.7  46.25  4.7  46.25  
5  50  5  50  
5.8  50  5.8  58  
6.7  50  6.7  60 
Ports
 In(in)
 Input signal value that is used to calculate the output.
 Supported types: uint, int, real.
 Vector support: no.
 Input signal value that is used to calculate the output.
 Output (out)
 Output signal related to the input value and the lookup table.
 Supported types: real.
 Vector support: no
 Output signal related to the input value and the lookup table.
Properties
 Input values x
 Type in the array of input values used to calculate the output of the lookup table
 Output values f(x)
 Type in the array of output values according to the related input values used to calculate the output of the lookup table.
 Implementation method
 Choose the interpolation method used to calculate the output values when the input value is within the input array range.
 Extrapolation method
 Choose the extrapolation method used to calculate output values when the input value is outside of the input array range.
 Execution rate

Type in the desired signal processing execution rate. This value must be compatible with other signal processing components of the same circuit: the value must be a multiple of the fastest execution rate in the circuit. There can be up to four different execution rates, but they must all be multiple of the basic simulation timestep. To specify the execution rate, you can use either decimal (e.g. 0.001) or exponential values (e.g. 1e3) in seconds. Alternatively, you can type in â€˜inheritâ€™ in which case the component will be assigned execution rate based on the execution rate of the components it is receiving input from.
