MATLAB: Ttest for one row of matrix

ttest

Hi! I am trying to perform t-tests separately for each row of my 3×3 matrix. There is probably a standard way to do this but I can't seem to figure it out. Thank you in advance for your help!

Best Answer

A simple for-loop would do:
Nrows = size(DATA,1)
h = zeros(Nrows,1)
for k = 1:Nrows
h(k) = ttest(DATA(k,:))
end
Related Question