How can I return the output of a Simulink unit as an input?

I have 2 built-in Matlab functions that I use to create a Simulink model. Both functions use the output of the second function as their input. An error is currently appearing indicating that this is an invalid loop.

Does anyone know how to implement this type of behavior?

Screenshot showing the model and the error

+3
source share
1 answer

You have created an algebraic cycle, which means that to calculate the inputs of the Embedded MATLAB block directly depend on the outputs of the block. This is not allowed when the cycle is "self-translating", i.e. There is only one block in a loop.

- (-) - , Embedded MATLAB. . .

+4

Source: https://habr.com/ru/post/1777819/


All Articles