Error in my ttest2

2 vues (au cours des 30 derniers jours)
Adrienne
Adrienne le 19 Mai 2014
Here is my t-test code: I am trying to do a ttest2 which is not independent so far I have:
T = [SJ SJ SJ CM CM SJW; CM SJW CMW SJW CMW CMW]';
% Creates a matrix with the jump type numbers, so that each type is compared to the other
for ii=1:no_s;
[Ttestmjh(ii,1) Ttestmjh(ii,2)] = ttest2((jhmn(:,T(ii,1))),(jhmn(:,T(ii,2))));
% Runs a 2 tailed t-test on the mean jump height for each jump type
[Ttestsdjh(ii,1) Ttestsdjh(ii,2)] = ttest2((sdjh(:,T(ii,1))),(sdjh(:,T(ii,2))));
% Runs a 2 tailed t-test on the sdev jump height for each jump type
end
no_s means number of subjects there are 6. SJ, CM, SJW, CMW are the different jump types Ttestmjh and Ttestsdjh are 2 matrices 6x2 double of Nan's that I made at the start of my code
error: Index exceeds matrix dimensions.
Error in code5 (line 160) [Ttestmjh(ii,1) Ttestmjh(ii,2)] = ttest2((jhmn(:,T(ii,1))),(jhmn(:,T(ii,2)))); % Runs a 2 tailed t-test on the mean jump height for each jump type
I have made sure I have no zeros anywhere in the data it is trying to look.

Réponses (0)

Catégories

En savoir plus sur Time Series dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by