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

7 ビュー (過去 30 日間)
ADITYA NAYAK
ADITYA NAYAK 2020 年 2 月 8 日
コメント済み: ADITYA NAYAK 2020 年 2 月 9 日
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 Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by