Movavg function doesn't compute values for the entire timeseries
Show older comments
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 Comment
Poison Idea fan
on 9 Sep 2022
Moved: Star Strider
on 9 Sep 2022
Accepted Answer
More Answers (1)
Categories
Find more on Time Series in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




