Splitting Vector Elements in Simulink

103 ビュー (過去 30 日間)
Mervin Jey  Fernanddo
Mervin Jey Fernanddo 2015 年 3 月 16 日
コメント済み: Walter Roberson 2022 年 3 月 2 日
Please Help.
Error : Invalid Setting for input port dimensions Demux
How am I suppose to split the elements of a 2D Vector into individual signals. The output vector contains two elements.I tried several methods but am unable to fix the problem.
I don't understand why even after using a Demux for splitting the elements both output elements are routed through a single signal as shown in the Image.

回答 (2 件)

Sebastian Castro
Sebastian Castro 2015 年 3 月 16 日
Try using a Selector block instead, from the same library as the Demux block.
This should support multi-dimensional arrays and, in general, gives you more control than Demux blocks.
- Sebastian

Revathi Vegi
Revathi Vegi 2019 年 3 月 9 日
Hello,
Please help me in solving this.
I have a column matrix(3*1) which is the output obtained from some matrix operations. I want to use these column matrix elements as seperate inputs(go to blocks) for another one. How to get these matrix elements seperately?
when I tried using demux the output dimensions are (3*1) same as input which I cant use as input for other one. Also I tried using selector block but i didnt understand how this selector block will help me in seperating the column matrix elements.
Also i tried matlab function block next to the column matrix in order to use 'matsplit' command to split the matrix elements. But i am getting error as invalid command. I am using R2017b version for my work.
Please suggest me.
Thankyou in advance:)
  3 件のコメント
khalid ELhoubri
khalid ELhoubri 2022 年 3 月 2 日
Hello Revathi Vegi ,I have got some situation (3 * 1 signal), can you please share with the solve this issue
Thank you in advance
Walter Roberson
Walter Roberson 2022 年 3 月 2 日
Use three output ports on the demux; each one will get one if the input values.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAdditional Math and Discrete についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by