Autocorr function for each column of a matrix

5 views (last 30 days)
I want to find the autocorrelation for each column of a matrix, from column 3 to the end of the columns. I also want to store this results in a vector named acorr_yld. I use the following:
if true
% acorr_yld(1,:) = autocorr(data{4}(:,3:end),1)
end
This setting works for the function mean and std however, this does not work for autocorr. What am I missing? I get the following error:
if true
% Error using autocorr (line 83)
% Input series must be a vector.
end

Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!