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

9 visualizaciones (últimos 30 días)
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

Respuesta aceptada

stozaki
stozaki el 9 de Feb. de 2020
I attached example model.
Please try to use it.
  1 comentario
ADITYA NAYAK
ADITYA NAYAK el 9 de Feb. de 2020
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by