3D Lookup Table made with 2D Lookup Tables

조회 수: 37 (최근 30일)
Gulfer Ozcetin
Gulfer Ozcetin 2021년 6월 20일
댓글: Omkar Sastry 2021년 6월 23일
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에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by