MATLAB Answers

How to create a buffer FIFO, filter and then save in an array values that are between an specific range of values?

4 views (last 30 days)
Mariana on 15 Feb 2020
Commented: stozaki on 18 Feb 2020
I have a sine wave as input signal at a sampling rate of 0.02. I want to process the first 1000 sampling points = 20 sec in a FIFO buffer
Signal ---> buffer size (1000) ---> full --> save in an array only values that are negative. --> next 20 seconds.
This is the simulink implementation that I have so far. My idea is to have two signals the real one an the delayed one. Save in a buffer the data from the delayed signal. Lets say that the delayed signal has a delay of 20 seconds, from this one I buffer the first 20 seconds and apply my filter of negative values and save them in an array. That means that when I buffer the next 20 are ready to be buffered, processed and filter.
Hope we can discuss some good ideas!


Show 2 older comments

Sign in to comment.

Accepted Answer

stozaki on 16 Feb 2020
I attached modified model you made.
unbuffer is just for the description of the block. It is arranged to explain the difference from Buffer. There is no more meaning.


Show 4 older comments
Mariana on 16 Feb 2020
What is the difference between the two attached files? I also would like to ask. How is this change of color made? Looks nice
Mariana on 17 Feb 2020
How can I delete the data from previous steps. I dont want accumulate all values in the matrix. I just want to have a fixed number of 1000 values inside this matrix.

Sign in to comment.

More Answers (0)

Sign in to answer this question.