我有一个带有两列的矩阵,如何每隔21行进行一次相关?

时间:2016-10-05 17:53:40

标签: matlab

我想把它们放在一个循环中:

r1 = corr(a(1:21,1),a(1:21,2),'type','Pearson');
r2 = corr(a(22:42,1),a(22:42,2),'type','Pearson');
r3 = corr(a(43:63,1),a(43:63,2),'type','Pearson');

1 个答案:

答案 0 :(得分:0)

days = int(input("Please enter the number of days you will have the car: "))
weeks = (days/7)