MATLAB: Using interpolation to replace missing values (NaN)

后端 未结 6 875
一整个雨季
一整个雨季 2020-12-10 16:29

I have cell array each containing a sequence of values as a row vector. The sequences contain some missing values represented by NaN.

I would like to re

6条回答
  •  抹茶落季
    2020-12-10 16:59

    As JudoWill says, you need to assume some sort of relationship between your data.

    One trivial option would be to compute the mean of your total series, and use those for missing data. Another trivial option would be to take the mean of the n previous and n next values.

    But be very careful with this: if you're missing data, you're generally better to deal with those missing data, than to make up some fake data that could screw up your analysis.

提交回复
热议问题