Movavg function doesn't compute values for the entire timeseries
Mostra commenti meno recenti
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 Commento
Poison Idea fan
il 9 Set 2022
Spostato: Star Strider
il 9 Set 2022
Risposta accettata
Più risposte (1)
Categorie
Scopri di più su Time Series in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





