N-D Look up Tables

조회 수: 1 (최근 30일)
Ali Almakhmari
Ali Almakhmari 2023년 6월 19일
답변: Fangjun Jiang 2023년 6월 20일
I have been at this for hours and I feel stupid. I keep getting the error: the number of diemsnions is 1, but the block parameter is 7. the dimensions and value....
So I have 8 vectors that are 10000 by 1. 7 of those vectors are input columns where each row has a different combination of those inputs, and the 1 output column correpsonds of the result/answer/output to those specific combinations of inputs. I would like to use the N-D Look up table block in Simulink to take all those 8 vectors into consideration, and then, given to it any combination of the 7 input values, it will try its best to estimate the output value. Is this not possible in the Look-up table? Or am I just doing something wrong.

채택된 답변

Fangjun Jiang
Fangjun Jiang 2023년 6월 20일
You have a 10000x8 table. The first seven columns (10000x7) data is all the possible combinations of the seven input variables. For example, 2x5x2x5x2x5x10, a total of 10000 combinations.
You need to do a reshape() to make the last column 10000x1 data into a 2x5x2x5x2x5x10 matrix. Then use the n-D lookup table block to implement the lookup. The dimension would be 7.
It certainly is possible (dorable). You just need to make the data into the right format, the matrix mentioned above, and collect the breakpoints for all those seven input variables. For example, if the possible value for the first input varialbe is 10 and 100, then the breakpoints would be [10,100]. If the possible value for the second input variable is 5,4,3,2,1, then the breakpoints would be [1,2,3,4,5] (the value needs to be incremental).
The Matrix data needs to be arranged correctly according to the breakpoints.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Nonlinearity에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by