1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
clear
B = [1;0;0.5;-2;0] X = randn(100,5);
BOLD = X*B + randn(100,1)*.5
conditions = [1 3 5] X1= X(:,conditions)
[b,~,~] = glmfit(X,BOLD,'normal')
[b,~,~] = glmfit(X1,BOLD,'normal')
B(conditions)
for ii = 1:100 [b,~,~] = glmfit(X,BOLD,'normal') ;
B0(:,ii) = b(conditions+1);
[b,~,~] = glmfit(X1,BOLD,'normal');
B1(:,ii) = b(2:end);
end
B0m = mean(B0,2) B1m = mean(B1,2)
|