### Block: LookupTable3D

Inports
x | Table index in x direction
y | Table index in y direction
z | Table index in z direction

Outports
Out | Table output

Mask Parameters
Name | ID | Description
TableData | 1 | Look-up table data
DimX | 2 | Number of data points in x-direction
x_min | 3 | Minimum input value of x-dimension for look-up table
x_max | 4 | Maximum input value of x-dimension for look-up table
DimY | 5 | Number of data points in y-direction
y_max | 6 | Maximum input value of y-dimension for look-up table
y_min | 7 | Minimum input value of y-dimension for look-up table
DimZ | 8 | Number of data points in z-direction
z_min | 9 | Minimum input value of z-dimension for look-up table
z_max | 10 | Maximum input value of z-dimension for look-up table

##### Description:

Three dimensional look-up table with selectable number of data points.

Table data must be an array of size DimX*DimY*DimZ.

If input is out of specified range, output will be cut off (no extrapolation).

The table of the LookupTable3D block must contain DimX times DimY times DimZ data points and they have to be arranged as

TableData = | [f(x1,y1,z1), f(x2,y1,z1), ... f(xn-1,y1,z1), f(xn,y1,z1), |  |
| f(x1,y2,z1), f(x2,y2,z1), ... f(xn-1,y2,z1), f(xn,y2,z1), |  |
| ... |  |
| f(x1,ym-1,z1), f(x2,ym-1,z1), ... f(xn-1,ym-1,z1), f(xn,ym-1,z1), |  |
| f(x1,ym,z1), f(x2,ym,z1), ... f(xn-1,ym,z1), f(xn,ym,z1) |  |
| f(x1,y1,z2), f(x2,y1,z2), ... f(xn-1,y1,z2), f(xn,y1,z2), |  |
| f(x1,y2,z2), f(x2,y2,z2), ... f(xn-1,y2,z2), f(xn,y2,z2), |  |
| ... |  |
| f(x1,ym-1,zk), f(x2,ym-1,zk), ... f(xn-1,ym-1,zk), f(xn,ym-1,zk), |  |
| f(x1,ym,zk), f(x2,ym,zk), ... f(xn-1,ym,zk), f(xn,ym,zk)] |  |

with n as selected DimX, m as selected DimY and k as selected DimZ values.

For interpolation of the data, the trilinear interpolation method is used. The interpolation is implemented as

with Δ x, Δ y, Δ z as relative distances to the starting point f000 and with the coefficients

derived from the lattice points relative to the starting point.

##### Implementations:

FiP16 | 16 Bit Fixed Point Implementation
FiP32 | 32 Bit Fixed Point Implementation
Float32 | 32 Bit Floating Point Implementation
Float64 | 64 Bit Floating Point Implementation

#### Implementation: FiP16

16 Bit Fixed Point Implementation

Inports Data Type
x | int16
y | int16
z | int16

Outports Data Type
Out | int16

#### Implementation: FiP32

32 Bit Fixed Point Implementation

Inports Data Type
x | int32
y | int32
z | int32

Outports Data Type
Out | int32

#### Implementation: Float32

32 Bit Floating Point Implementation

Inports Data Type
x | float32
y | float32
z | float32

Outports Data Type
Out | float32

#### Implementation: Float64

64 Bit Floating Point Implementation

Inports Data Type
x | float64
y | float64
z | float64

Outports Data Type
Out | float64