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

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일

2 개 추천

I attached example model.
Please try to use it.

댓글 수: 1

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개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

제품

질문:

2020년 2월 8일

댓글:

2020년 2월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by