文章目录
- 0.prolog
- 1 Starting and ending indices (port)
- 2. Starting index (port)
- 3. Starting index (dialog)
- 4. Index vector (dialog)
- 5. Index vector (port)
- Reference
0.prolog
Index mode
有两种,[one-based, zero-based],分别是从1开始计数,从0开始计数- 需要注意的是
Starting and ending indices (port)
模式只能够运行在离散模型中,其他均可运行在连续模型或者离散模型
1 Starting and ending indices (port)
- 该模式需要提供两个数字,一个是 start,一个是 end
- 比如下图中为 [2 4],则从 [start=2, end=4] 抽取数据,原始数据为 [ 1 2 3 4 5],输出数据为 [2 3 4]
2. Starting index (port)
- 该模式仅需要提供 start 的数字,但是需要在模块参数里配置要输出的 size
- 如下图[start = 3, size = 2],则输出[3,4]
3. Starting index (dialog)
- 该模式需要在模块配置界面指定 [start, size]
- 如下图 [2, 2],输出为 [2,3]
4. Index vector (dialog)
- 该模式下需要在模块参数配置界面设置要输出的size
- 如下图 index 为 [2,5],输出为 [2, 5]
3. 如下图 index 为 [2:5],输出为 [2 3 4 5],注意这里是冒号
5. Index vector (port)
-
该模式下使用 port 进行设置
-
如下图为 [1 3],输出为 [1 3]
-
如下图为 [1:3],输出为 [1 2 3]
Reference
- Selector