Simulink 中 look-up-table 处的断点是什么?
What are breakpoints at the look-up-table in Simulink?
在Simulink/Matlab中使用查找-table时,我不明白什么是断点。比如我有一个table数据,是50列5行。所以我用的是2D Look-up-table,在"table data"处我写了table的名字,但是我不知道应该在[=14=里放什么] 和 "Breakpoints 2"? "Breakpoints specification" 我应该 select 哪个选项?
我将尝试为您解释这一点。我知道它是一个旧的 post 但我以前也很难理解它,所以我希望它能帮助别人。
假设您想创建一个查找 table 其中:
X = f(Y, Z)
举个例子,假设它是非常简单的加法:
X = Y + Z
所以如果 Y = 1
和 Z = 2
, X = 1 + 2 = 3
现在我们可以为 X 创建查找 table。
如果您阅读了 Simulink
中 lookuptables 的文档中的断点
"Values: 1-by-n or n-by-1 vector of monotonically increasing values"
Meaning that Y and Z need to be monotonically increasing
所以假设我们想要在以下时间进行二维查找 table:
Y = [1 2 3] and Z = [4 5 6] <------ These are your breakpoints
然后查找 table 将如下所示:
4 5 6 <---- Z breakpoints
1 5 6 7
2 6 7 8 <---- X table; X = f(Y, Z); X = Y + Z in this case
3 7 8 9
^
Y breakpoints
在Simulink/Matlab中使用查找-table时,我不明白什么是断点。比如我有一个table数据,是50列5行。所以我用的是2D Look-up-table,在"table data"处我写了table的名字,但是我不知道应该在[=14=里放什么] 和 "Breakpoints 2"? "Breakpoints specification" 我应该 select 哪个选项?
我将尝试为您解释这一点。我知道它是一个旧的 post 但我以前也很难理解它,所以我希望它能帮助别人。
假设您想创建一个查找 table 其中:
X = f(Y, Z)
举个例子,假设它是非常简单的加法:
X = Y + Z
所以如果 Y = 1
和 Z = 2
, X = 1 + 2 = 3
现在我们可以为 X 创建查找 table。 如果您阅读了 Simulink
中 lookuptables 的文档中的断点"Values: 1-by-n or n-by-1 vector of monotonically increasing values" Meaning that Y and Z need to be monotonically increasing
所以假设我们想要在以下时间进行二维查找 table:
Y = [1 2 3] and Z = [4 5 6] <------ These are your breakpoints
然后查找 table 将如下所示:
4 5 6 <---- Z breakpoints
1 5 6 7
2 6 7 8 <---- X table; X = f(Y, Z); X = Y + Z in this case
3 7 8 9
^
Y breakpoints