-3

I have a system in Simulink/HDL coder (see below image please). I have 3 outputs and 3 inputs. I want my system to run 10 times. After each iteration it should select the outputs and use them as inputs. How I can do that?

loop in simulink

1
  • Your question is incomplete. Which output should be connected to which input? What are the initial values of the inputs. One iteration per clock cycle. When to start iterating? How to signal completion? Commented Mar 5, 2016 at 8:12

1 Answer 1

1

Build a loop using a memory and a initial value block for each signal. The memory block allows you to access the previous iteration signal and the initial value block is used to set the input for the first iteration.

A simple example looping back one signal can be found here in the documentation

In your case it would look like this:

enter image description here

To get 10 iterations, set your simulation time corresponding. For example a fixed step discrete solver using 1s sample rate and 9s simulation time.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.