Fillmissing & Smooth LOESS span

조회 수: 1 (최근 30일)
Tiago Dias
Tiago Dias 2018년 9월 25일
편집: Tiago Dias 2018년 9월 25일
Hi,
I got my Data, matrix X. For column 2 for example, I got 4 sequences of NaN values. Instead of fillmissing by movmean all the length of X(:,2), I search for the 4 sequence of NaN values and for each, select a window to perform the movmean and only fill the NaN values.
Question 1) I would like to know if "spline" or "pchip" under the function fillmissing i can input a size window similar to movmean methodology?
Question 2) For making the smooth, i would like to know what the span is, because when I do
idx_time = [1:size(X,1)]';
Xsmooth = smooth(idx_time,X(:,2),0.01,'loess')
The span of 0.01 still result in NaN's, but 0.1 does all the fill to NaN sequence. I would like to know what to do to find the best span and if it is possible to calculate a span for each sequence for column 2. Sequence 1 has 4 NaNs (from 4 to 7), Sequence 2 has 2 NaNs (index 9 to 10), Sequence 3 has 2 NaNs (index 61 to 62), Sequence 4 has 2 NaNs (from 64 to 65).
Thanks for your help.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by