Error in my ttest2
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Time Series에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!