MATLAB: Simulink: get range of values from lookup table

lookup tablesimulink

In Simulink, I have a 1-D lookup table containing data with evenly-spaced breakpoints. I want to compute the mean of the table data between two points. Is it possible to do this?

Best Answer

TableData=1:10;
dStart=3;
dEnd=6;
index=and(TableData>=dStart, TableData<=dEnd);
SelectedData=TableData(index)
SelectedData =
3 4 5 6