Here is my code, but I can only get one value instead of 6 slope values:
for i=1:10
a=Allmsd{i};
for j = 1: length(a)
t = a(301:500,1);
x = a(301:500,2);
P= polyfit(t,x,1);
slope = P(1);
end
Allmsd(i)=slopes
end