Hello,
I've been trying to use the ttest function to compute a paired ttest between power values obtained from EEG (pre vs post) using the following function:
pval = 0.05 [h, p, ci, stats] = ttest(EEG1, EEG2, pval);
and
[h, p, ci, stats] = ttest(squeeze(EEG1), squeeze(EEG2), pval);
But it gives me the same error:
Undefined function or variable 't'.
Error in nanmean (line 7) N = sum(~isnan(t), dim);
Error in ttest (line 131) xmean = nanmean(x,dim);
Is this because the NaN function is not working? If so, does anyone know how to fix it?
Best regards,
Christian