- 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?
7 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Puru Kathuria
2021 年 1 月 3 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!