SyntaxFix
Write A Post
Hire A Developer
Questions
For correlations you can just use the corr function (statistics toolbox)
corr(A_1(:), A_2(:))
Note that you can also just use
corr(A_1, A_2)
But the linear indexing guarantees that your vectors don't need to be transposed.