Clear Filters
Clear Filters

How to isolate particular values from matrix containing Spearman rank correlation coefficient

1 view (last 30 days)
Hi,
I hope I can manage to ask this problem clearly!
I am using a data set that contains two matrices both (365x48) in dimension. I first perform a smoothing function using a 29 day window to smooth both data sets, as seen in the code below:
for i=1:365;
p=1:48;
if i<=14
KILB11_AP_SW_PU_Matrix(i,p)=mean(KILB11_AP_PU_Matrix([(i-1)+352:365 1:i+14],p));
else if i>=352
KILB11_AP_SW_PU_Matrix(i,p)=mean(KILB11_AP_PU_Matrix([i-14:365 1:1+(i-352)],p));
else KILB11_AP_SW_PU_Matrix(i,p)=mean(KILB11_AP_PU_Matrix((i-14):(i+14),p));
end
end
end
What I would like to do is to analyse how the value of the Spearman rank correlation coefficient changes throughout the year between my two variables. Ideally I would compute the value of the coefficient for each specific element in both matrices by using the same 29 day window principle to calculate the coefficient.
I am hopeful that there may be someway to isolate the value of the coefficient from the resultant matrix output from using the 'corr(MATRIX,'type','Spearman').
Any ideas?

Answers (0)

Community Treasure Hunt

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

Start Hunting!