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)
Show older comments
MathWorks Support Team
on 27 Jun 2009
Commented: MathWorks Support Team
on 13 Jun 2014
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
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.
1 Comment
MathWorks Support Team
on 13 Jun 2014
Thanks for letting us know that the model file was no longer visible. It is now attached above.
More Answers (0)
See Also
Categories
Find more on Lookup Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!