Simulink: get range of values from lookup table

1 回表示 (過去 30 日間)
jp
jp 2019 年 3 月 4 日
回答済み: Fangjun Jiang 2019 年 3 月 6 日
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 件のコメント
Fangjun Jiang
Fangjun Jiang 2019 年 3 月 5 日
not clear what you actually want to do. example?
jp
jp 2019 年 3 月 5 日
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.

サインインしてコメントする。

採用された回答

Fangjun Jiang
Fangjun Jiang 2019 年 3 月 6 日
TableData=1:10;
dStart=3;
dEnd=6;
index=and(TableData>=dStart, TableData<=dEnd);
SelectedData=TableData(index)
SelectedData =
3 4 5 6

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEvent Functions についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by