Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.

1 visualización (últimos 30 días)
clear all
load Data_allRT.mat
load exptM.mat
load Data_part1.mat
load Data_part2.mat
m=0;
for n=1:10000;
x = shuffledData_part1;
y = shuffledData_part2;
[h,p]=ttest2(x',y');
DD(n)=p;
if p<0.05;
m=m+1;
end
end

Respuestas (1)

Walter Roberson
Walter Roberson el 15 de Nov. de 2019
If your x and y are 2D arrays (not vectors) with more than 1 column, then h and p will have one entry per column.
Note that ttest2() is deterministic and that you are running the same test each time. Perhaps you had intended to index one row or one column each iteration ?

Categorías

Más información sobre Structures en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by