- 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 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Pranjal Kaura
2021 年 8 月 31 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で General Applications についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!