Synchronizing experimental data with different timescales
이전 댓글 표시
Hi all,
I am still concerned about the same project as yesterday. I have recorded experimental data of one experiment with several devices (GC (gas sample), GC-SCD (liquid sample), UVVIS (liquid sample), Volume flow measurement). These devices produce data at different frequencies, which leaves me with some trouble when it comes to calculating molar flows of components and reaction rates. The following (simple-sorry for the excel look) figure should help clarify what I mean: http://tinypic.com/r/900vm8/7
How can I extend the matrices of the devices with a slower sampling rate? I think I want to sample all data up to the same, highest frequency. I actually don't think about interpolation but just repeating the same value of one device until the the next measured value is there. Are there possibly already matlab functions out there which meet my needs, or how can I implement something myself? The dates are already in number format.
Best regards,
bearli
채택된 답변
추가 답변 (1개)
Oleg Komarov
2011년 8월 5일
You can use run-length decoding to expand the low-frequency data to match the high-frequency:
% Generate random dates (sorted in ascending order)
hf = now + sort(rand(10,1)/100);
lf = now + sort(rand(10,1)/30);
datestr(hf)
datestr(lf)
% Now bin/(count) the high-freq into the low-freq according to [...) edges
len = histc(hf,lf);
% Use the counts to replicate the low-freq
rude(len,lf).'
카테고리
도움말 센터 및 File Exchange에서 Time Series Events에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!