I have been trying to multiply 2 sets of timeseries data in Simulink, At
and Bt
, and I expected the result to be like this:
ans = sum(A(1:t)*B(t:-1:1))
For instance, when t = 3
, the result should be
ans =At1*Bt1 + (At2*Bt1 + At1*Bt2) + (At3*Bt1 + At2*Bt2 + At3*Bt1)
I got these 2 datasets from one of my Simulink models and I want to continue my simulation with the same model.
To achieve this, I guess I need to flip one of those 2 datasets.
So I tried the Matlab function flip()
, but it doesn't work when the argument is a timeseries.
Then I tried to first output those data to Matlab workspace as arrays and flipped them, and then input them back to my Simulink model, but this didn't work as well because in those arrays there are no any columns storing Time information.
At last, I found that there is a block called "Flip" in the DSP Toolbox, but the thing is that I don't have this toolbox, probably we won't buy it, and I am not sure if this block works.