Constant input as "iteration limit" for "for loop iterator" block

9 次查看(过去 30 天)
In the for loop iterator block, is it necessary to have the external value input for "iteration limit (N)" as a constant value. If yes, how to handle the scenario where in the limit needs to be variable value?
The following blocks handling as attached in the image gives the following error "must be connected to either an input port, a width block, or the signal width output port of a probe block"
ForIteratorBlock.JPG

采纳的回答

stozaki
stozaki 2020-2-9
I attached example model.
Please try to use it.
  1 个评论
ADITYA NAYAK
ADITYA NAYAK 2020-2-9
Dear Stozaki,
Appreciate your time taken to reply on the question. This approach solved the issue. The summary I understood that the variable operation (like any operations +, -, *rt, /) should be done outside the for iterator subsystem. Within the for iterator it should have only input port against the "iteration limit (N)" port.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Subsystems 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by