Averaging Varying Length Vector Sets to 1 Vector

1 view (last 30 days)
I am trying to use the built in autocorrelation function within the econometrics toolbox to analyze some data. The data set is supposed to decay to zero at different points, and I care about trying to find the average plot of where this decays to zero. The issue is that the data set is different lengths so I concatenate on nan's which are discarded to get vectors to match the longest vector of interest.
Because of the way this is set up with each vector being its own row, I have used nanmean and nanmedian down the columns to try to determine my average plot. The issue here is that longer traces have more of an impact on the decay because there are less values to average together. How do I produce an accurate plot showing what the average decay of this autocorrelation function should be?

Answers (0)

Categories

Find more on Linear and Nonlinear Regression in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!