Can I have a Simulink Lookup table block that looks up different datasets for the same input and returns multiple outputs?

29 views (last 30 days)
The current one-dimensional lookup table block looks up for a data value within a single dataset. I would like to look up for values across multiple data sets with a single input to a single Lookup Table block. In other words, I have a data set with same Xinputs but Multiple one-dimensional YOutputs. Given a data point, I would like to interpolate across all the YOutpus in one go.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 Sep 2017
To look up values across multiple data sets with a single input in a single Lookup Table block can be achieved using 'Prelookup' and 'Interpolation for Prelookup' blocks in the lookup table library of SIMULINK.
The 'Prelookup' block contains the dataset of independent variable. It takes in the value of the independent variable (that needs to be interpolated), and outputs the index and interval fraction specifying how this value relates to the data set of the independent variable.
The 'Interpolation for prelookup' block, contains different data sets of the dependent variable. The block takes in the output of 'Prelookup' block, and gives out the interpolated values of the dependent variable.
Attached is a SIMULINK model that illustrates this for one data set of independent variable and two data sets of dependent variable.
In addition:
You may copy the text file and save that file as MDL file . it will convert text file into MATLAB model then you can open it as a Simulink model.

More Answers (0)

Products


Release

R2006a

Community Treasure Hunt

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

Start Hunting!