How to accumulate simulink data

4 views (last 30 days)
minkwan kim
minkwan kim on 13 Sep 2017
Answered: Suze Zhang on 20 Sep 2017
for example, there are input data. t1->[1 2 3]' t2->[4 5 6]' t3->[7 8 9]'>[......]-------(1)
I want to make this data like this [1 2 3; 4 5 6; 7 8 9;........]'------(2)
How can i do this in 'Simulink'??
Explain more precisely
In Simulink simulation, my system block that i make by my self for a some purpose process a input data one by one like this
t1->[1 2 3]->[my system block]->output1->t2->[4 5 6]->[my system block]->output2->t3->...............
However, I want make Simulink simulation like this
1)t1->[1 2 3]->[my system block]->output1->t2->[1 2 3;4 5 6]->[my system block]->output2->t3->[1 2 3;4 5 6;7 8 9]->.....
2)t1->t2->t3->.....->tn->[1 2 3; 4 5 6; 7 8 9;........]->[my system block]->output
I prefer 1) way..........
How can i make 1)or2) way in simulink?? is there any library block or matlab code for simulink fcn block????

Answers (1)

Suze Zhang
Suze Zhang on 20 Sep 2017
Hi Minkwan,
I think you can use the Mux block in Simulink library, which combine several input signals into a vector. The documentation link to this block is provided below:


Community Treasure Hunt

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

Start Hunting!