Movavg function doesn't compute values for the entire timeseries
Ältere Kommentare anzeigen
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 Kommentar
Poison Idea fan
am 9 Sep. 2022
Verschoben: Star Strider
am 9 Sep. 2022
Akzeptierte Antwort
Weitere Antworten (1)
Kategorien
Mehr zu Time Series finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





