splitting matrix into separate elements

조회 수: 9 (최근 30일)
Revathi Vegi
Revathi Vegi 2019년 3월 9일
답변: Fangjun Jiang 2019년 3월 11일
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