Simulink: get range of values from lookup table

4 visualizaciones (últimos 30 días)
jp
jp el 4 de Mzo. de 2019
Respondida: Fangjun Jiang el 6 de Mzo. de 2019
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?
  2 comentarios
Fangjun Jiang
Fangjun Jiang el 5 de Mzo. de 2019
not clear what you actually want to do. example?
jp
jp el 5 de Mzo. de 2019
For example, if the table data is [1 2 3 4 5 6 7 8 9 10], and I have calculated the start and end points to be 3 and 6, I need to be able to get [3 4 5 6] out.

Iniciar sesión para comentar.

Respuesta aceptada

Fangjun Jiang
Fangjun Jiang el 6 de Mzo. de 2019
TableData=1:10;
dStart=3;
dEnd=6;
index=and(TableData>=dStart, TableData<=dEnd);
SelectedData=TableData(index)
SelectedData =
3 4 5 6

Más respuestas (0)

Categorías

Más información sobre Lookup Tables en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by