ttest function not working

15 views (last 30 days)
Arryn
Arryn on 16 May 2014
Commented: Arryn on 17 May 2014
I am trying to implement an independent samples ttest comparing two data sets (X and Y). Here is what I used: [h,p,ci,stat] = ttest2(X,Y)
Here is the error I receive: Undefined function or method 'ttest2' for input arguments of type 'double'.
Not sure why it's not locating ttest function. I'm in the main MATLAB directory. I appreciate any help.

Accepted Answer

Image Analyst
Image Analyst on 16 May 2014
It's probably in the Statistics Toolbox. Do you have that? Use "ver" to find out.
  3 Comments
Image Analyst
Image Analyst on 16 May 2014
Nope - it's only in the Stats Toolbox. You might have to try to write your own or find an equivalent function on the File Exchange. Please mark as Accepted if you have no more questions.
Arryn
Arryn on 17 May 2014
Thanks, I'll check it out.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!