Perform grouping of the means in a multiple comparison test using letters.
Multiple comparison test can be by Tukey-HSD, LSD, Bonferroni, Dunn-Sidak or Scheffe.
WARNING: is indispensable that the means of x matrix are sorted in crescent order.
For 3 treatments in 4 replications:
x=[9.0 1.0 3.1
5.0 2.0 3.2
7.0 1.1 3.0
8.0 1.2 3.0];
Sorting x in crescent order:
[p,a,s] = anova1(xo);
Multcompare using HSD Tukey at 5% significance:
[c,m,h,nms] = multcompare(s,'alpha',0.05,'ctype','hsd');
phg = phgroup(xo,c);
mean std group
7.2500 1.7078 a
1.3250 0.4573 b
3.0750 0.0957 b