フィルターのクリア

fillmissing function with makima method

5 ビュー (過去 30 日間)
katie_km
katie_km 2023 年 5 月 23 日
コメント済み: Steven Lord 2023 年 5 月 30 日
Hi!
I'm trying to fill the missing data with fillmissing function and makima method for gaps that are less than 12000 samples. This is the code I used:
trial8 = fillmissing(trial8,'makima','MaxGap',12000);
It removes NaNs, but for some reason gives weird and wrong negative values. I'm attaching the screens, first is my data before filling and the second after filling. Could somebody tell me what do I do wrong?
  4 件のコメント
katie_km
katie_km 2023 年 5 月 23 日
@Matt J The point of using the function was getting rid of the drop, not extending it.
Steven Lord
Steven Lord 2023 年 5 月 30 日
Is that drop in some sense "real" or is it an artifact of some issue with the data gathering process? Do you really want to use fillmissing here or would either rmmissing or rmoutliers be a better match for what you're hoping to do with this data?
If I was collecting data from a thermometer and it accidentally kept recording once I took it from under my tongue and put it back in its case, that data shouldn't be filled it should be removed entirely.

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2023 年 5 月 23 日
Thje 'makima' method is likely best for filling NaN gaps in varying data. Yours appear to be relatively constant, other than for that one instance.
See if using 'nearest' instead will improve the result. .
  4 件のコメント
katie_km
katie_km 2023 年 5 月 30 日
編集済み: katie_km 2023 年 5 月 30 日
@Star Strider, thank you, it worked! :D
Star Strider
Star Strider 2023 年 5 月 30 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by