splitting matrix into separate elements

9 次查看(过去 30 天)
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:)

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2019-3-11
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.

类别

Help CenterFile Exchange 中查找有关 Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by