I would like to pass the same function to all the columns of an object.
I tried this code but it doesn't work
for j = 1:3
autocorr(VAR.res(:,j))
end
where basically I wanted to tell MATLAB "compute autocorrelation for all the 3 columns of VAR.res".
What did I do wrong?
Thanks
2 Comments
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/515052-how-to-pass-the-same-function-to-different-columns#comment_820492
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/515052-how-to-pass-the-same-function-to-different-columns#comment_820492
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/515052-how-to-pass-the-same-function-to-different-columns#comment_820505
Direct link to this comment
https://uk.mathworks.com/matlabcentral/answers/515052-how-to-pass-the-same-function-to-different-columns#comment_820505
Sign in to comment.