splitting matrix into separate elements

6 views (last 30 days)
Revathi Vegi
Revathi Vegi on 9 Mar 2019
Answered: Fangjun Jiang on 11 Mar 2019
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:)

Answers (1)

Fangjun Jiang
Fangjun Jiang on 11 Mar 2019
Drop a Constant block, specify the value as [1;2;3], connect it to a Demux block, specify the "Number of outputs" as 3. Connect the output to three "Display" block and run the simulation. You should see 1, 2 and 3 displayed.

Categories

Find more on Equations in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!