filling gaps in time data series with NaN
1 回表示 (過去 30 日間)
古いコメントを表示
how can I fill each missed data point of my sensor data that is logged in every 15 minutes please? I have applied interploation into the dataset so I will get 96 data points every 24 hours. Now I need these gaps to be filled in with NaN so I will get plot which displays these gaps.
0 件のコメント
回答 (1 件)
Adam Danz
2021 年 3 月 12 日
Compare the original vector of datetime value with the interpolated vector using ismember. This will create a logical vector identifying which values in the interpolated vector are the original data.
isOriginal = ismember(interpVector, originalVector);
interpVector(~isOriginal) = NaN;
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Hypothesis Tests についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!