Here are the steps to do a one-sample t-test using data in Excel and MATLAB. Excel does not provide this option.
Copy the data from a row or column in Excel
Paste into a variable in MATLAB:
Go to the Command Window
Type “>> y = [“
Paste
Type “]”
Hit Enter; you’ve now created a variable “y” in MATLAB
RRun the ttest function in MATLAB:
>> [h,p] = ttest(y)
p returns the p-value, and h is 1 (p<0.05) or 0.
See MATLAB’s help on ttest.