MATLAB Answers

store previous values then use them in simulink

89 views (last 30 days)
Ghazwan
Ghazwan on 13 Nov 2017
Commented: Ghazwan on 16 Jun 2018
Hello, Let's say that I'm getting y=[1 5 7 2 3] at Time=[0 1 2 3 4 5] in a Simulink simulation. At Time=6, I would like to use all the previous values stored in y. I tried Unite Delay, Memory, and Data Store Blocks. But they didn't work. I also tried to make a costumized function in matlab, but it works on point-by-point bases. Is there any other way around this?
Thanks in advance

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 16 Jun 2018
You can use buffer in Simulink to store a specified number of values. The buffer block will output a vector when after receiving the number of samples and you can process on the past values.

More Answers (0)

Sign in to answer this question.