- Initialise the buffer of the appropriate size/capacity
- read data in a sequential manner and write to the buffer
- then read the buffer and do further processing
How to buffer a certain amount of data in a buffer without saving all the data that passes through it?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two approaches. The problem with the one in the zip file is that it is saving all the values everytime they pass to the matrix. I dont want to save them. I just want to process them and save just the ones that I am interested in.
The second approach has a problem when extracting the data out it. Its not extracting 1000 values is creating an array of arrays. The first point is repeated 1000 times, then second point 1000 and so on. Its a ring buffer.
Hope you can help me find a solution to it.
The idea is to process 20 sec = 1000 samples filter and process them and just save the data that I am interested in.
0 comentarios
Respuestas (1)
Puru Kathuria
el 3 de En. de 2021
Example:
windowLength = 10;
dataBuff = dsp.AsyncBuffer(windowLength);
for iterator = 1:10
data = dataSource();
write(dataBuff, data);
%do further processing with this data
dataToFurtherProcess = read(dataBuff);
end
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!