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:

采纳的回答

Omkar Sastry
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 个评论
Gulfer Ozcetin
Gulfer Ozcetin 2021-6-23
Hello Omkar,
Thank you very much for your respond and concern! Using mux blocks is a very good idea, that helped me a lot! I really appreciate it!
Omkar Sastry
Omkar Sastry 2021-6-23
Hi Gulfer,
That's great! Glad it helped.
Thanks,
Omkar

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Nonlinearity 的更多信息

产品


版本

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by