There are some good posts on here (such as this one) on how to make a circular buffer in MATLAB. However from looking at them, I do not believe they fit my application, because what I am seeking, is a circular buffer solution in MATLAB, that does NOT involve any copying of old data.
To use a simple example, let us say that I am processing 50 samples at a time, and I read in 10 samples each iteration. I would first run through 5 iterations, fill up my buffer, and in the end, process my 50 samples. So my buffer will be
[B1 B2 B3 B4 B5]
, where each 'B' is a block of 10 samples.
Now, I read in the next 10 samples, call them B6. I want my buffer to now look like:
[B2 B3 B4 B5 B6]
The catch is this - I do NOT want to copy the old data, B2, B3, B4, B5 everytime, because it becomes expensive in time. (I have very large data sets).
I am wondering if there is a way to do this without any copying of 'old' data. Thank you.