I have two 4D matrices that I would like to do a ttest2 between to determine their relation at each point. The problem is that ttest2 only does the first element of the matrices, so I end up with a new matrix of dimension 1x128x17x12 from 64x128x17x12.
I have tried doing a for loop through:
for q=1:64
A(q,:,:,:)=ttest2(B,C);
end
However this just repeats the ttest for (1,:,:,:) for all 64 loops. I have tried putting the loop in each of B and C and even tried a nested loop but I end up getting the same problems.
Is there anyway I can get the full 4D matrix for each point from ttest2?
not quite, I would like a final matrix output of 64x128x17x12, that way I can tell which parts of the two are similar, and therefore plot only the significant results? Is there anyway to do this with ttest2?
Thank you for your reply, it may well be that I am using the wrong statistical test for what I want to do perhaps?
But what are the dimensions of B and C? Which dimension corresponds to the different samples/observations on which each individual test result will be based?