I have two 1* 6 matrices x and y. I'd like to find the correlation between them. when I use
I get a 2*2 matrix with all absolute values close to one. This implies that the relationship between the two variables is a linear relationship. However, the graph obtained when plotting the two variables is that of an exponential decay.
I don't know what I'm doing wrong and are there any alternative codes if the one I'm using is not suitable?
P.s. I'm investigating wither the relationship is linear or not (from the graph it is clearly not) How can I find the R-squared value for such data sets?