Fillmissing & Smooth LOESS span

1 visualizzazione (ultimi 30 giorni)
Tiago Dias
Tiago Dias il 25 Set 2018
Modificato: Tiago Dias il 25 Set 2018
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.

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by