3D Lookup Table made with 2D Lookup Tables
18 次查看(过去 30 天)
显示 更早的评论
Hello,
I need to construct a 3D lookup table with a combination of 2D lookup tables, in other words I should process the output of the 2D maps to carry out the same functions as a 3D lookup table. Since those blocks are using interpolation/extrapolation techniques, simple switches do not work...
My block data for 3D lookup table:
data_3d(:,:,1) =
54 14 84
13 25 25
data_3d(:,:,2) =
81 92 19
24 34 25
For the values around 1, I thought the switch should take the values of the first 2D lookup table, otherwise it should pass the values of second 2D lookup table. I know this is a very simple logic for this kind of a question but I am trying my best! Any ideas or information will be much appreciated! (Sine waves have 3 units of amplitude and 1 Hz of frequency)
The output I should get:
The output I got:
0 个评论
采纳的回答
Omkar Sastry
2021-6-22
Hi Gulfer,
It is possible to achieve the lookup table interpolation/extrapolation techinques by using a Mux block and a 1-D Lookup table block after the output of the two 2-D Lookup table blocks. The 1-D Lookup table block was enhanced in the R2020b release to allow Table data to come in via a signal line to an input port on the block. This can be done by setting the Source dropdown of the 1-D Lookup table block to 'Input port' for Table data. The output of the two 2-D Lookup table blocks are fed to the Mux block and then sent to the Table port of the 1-D Lookup table block as shown in the image below:
Note: The 1-D, 2-D and n-D Lookup table blocks started supporting Breakpoints and Table data via 'Input port' starting in the R2020b release. If you are using a release earlier than this, a similar solution can be made by replacing the 1-D Lookup table block by an Interpolation Using Prelookup block, which has had the 'Table as input port' support for many releases now. Hope this information helps. Please feel free to comment if you have any other questions. (The model .slx is attached with this answer).
Thanks,
Omkar
2 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinearity 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!