ttest function not working

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.

 采纳的回答

Image Analyst
Image Analyst 2014-5-16

0 个投票

It's probably in the Statistics Toolbox. Do you have that? Use "ver" to find out.

3 个评论

I don't have that toolbox, but I thought ttest was built into MATLAB with no need for the toolbox. Seems like the stats toolbox is for more advanced procedures like regression and ANOVA.
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.
Thanks, I'll check it out.

请先登录,再进行评论。

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by