- Number of input signals = 1
- Selector Mode = 'Fixed'
- Elements = [1] (2 if you want to extract the second row from the output X)
Simulink state space system with close loop
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi everyone,
I need help to solve a problem.
I'm building a simulink system. I have an 'interpreted function' block where at the input there are values that I take from the work space of the main matlab, and in output it gives me a 1-D signal which is then input into the state space block. The state space block sends me two values, since my initial state is a 2x10 vector. Seeing with scope the graph gives me two signals that are row 1 and row 2 of my updated vector. How do I take one of the two lines of the state space block output, then insert it together with the initial inputs in the 'function interpreted' block and do a close loop?
0 comentarios
Respuestas (1)
Pranjal Kaura
el 31 de Ag. de 2021
Hey,
It is my understanding that you want to extract a subset (a single row in your case) from the output of the state space block. You further want to pass this extracted vector into the 'function interpreted' block.
Variable Selector block can be used to extract a subset from the output of the state space block (say X). Since the shape of output 'X' is known, you can set the following parameters in the Variable selector block:
This extracted signal can then be concatenated to your inital inputs of the 'function interpreted' block using the Vector/Matrix concatenate block. You can further slice this input as per your requirement in the MATLAB function created for the 'function interpreted' block.
0 comentarios
Ver también
Categorías
Más información sobre General Applications en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!