Movavg function doesn't compute values for the entire timeseries
Afficher commentaires plus anciens
I use the movavg function twice to do a double exponential smoothing on timeseries data, and for some reasong it's only computing it for the first few points in each column. below is the code I use and I attached the timetable.
load august_filtered_data.mat
figure
plot(signal_timetable.Time,signal_timetable.Signal)
smoothed_data = twoexp_movavg(signal_timetable,60);
figure
plot(smoothed_data.Time,smoothed_data.Signal)
function [TT] = twoexp_movavg(TT,numpts)
ma = movavg(TT{:,:},'exponential',numpts);
dma = 2*ma - movavg(ma,'exponential',numpts);
TT{:,:} = dma;
end
1 commentaire
Poison Idea fan
le 9 Sep 2022
Déplacé(e) : Star Strider
le 9 Sep 2022
Réponse acceptée
Plus de réponses (1)
Catégories
En savoir plus sur Time Series dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





