# my_ph_letters_v2 Updated version 2.00b

Version 2.0.0.0 (6.31 KB) by
Means with letters after a multiple comparison test. The ultimate solution.
Updated 4 May 2016

%.
% VERSION: 2.00b
% SOLUTION: of the Tukey grouping of means.
% USING: the clique edge cover problem solution.
% BY: Classic Bron–Kerbosch algorithm or Tomita
% variation of Bron–Kerbosch algorithm.
%
% [ o ] = my_ph_letters_v2( cmat )
% [ o ] = my_ph_letters_v2( [], hmat )
%
% HMAT is the dependencies array
% CMAT is the array arising from MULTCOMPARE
%
% EXAMPLE
% -------
% For 3 treatments and 4 replications.
% ANOVA, post-hoc with MULTCOMPARE using HSD Tukey
% at 5% significance level, and grouping.
%
% x = meshgrid(1:3,1:4);
% rng default; % For reproducibility
% x = x + normrnd(0,1,4,3)
% [p,t,s] = anova1(x);
% [c,m,h,gnames] = multcompare(s,'alpha',0.05,'ctype','hsd');
% n=max(max(c(:,1:2)));
% h=zeros(n);
% for k=1:size(c,1)
% i=c(k,1); j=c(k,2);
% if c(k,3)*c(k,5)<=0, h(i,j)=1; end
% end
% grp1 = my_ph_letters_v2(c)
% grp2 = my_ph_letters_v2([],h)
%
% x =
%
% 1.5377 2.3188 6.5784
% 2.8339 0.6923 5.7694
% -1.2588 1.5664 1.6501
% 1.8622 2.3426 6.0349
%
%
% grp1 =
%
% 'a' 'ab' 'b'
%
%
% grp2 =
%
% 'a' 'ab' 'b'
%
% --------------------------------------
% >>> If considered useful,
% >>> It will be appreciated a postcard.
% --------------------------------------
%
% Author: Giuseppe Altieri
% University of Basilicata
% Department SAFE
% Viale dell'Ateneo Lucano, 10
% I-85100 Potenza, Italy
%
% Build Date: 16-02-2015
%
% version 2.00b
% 04-05-2016: corrected a bug into example script
%

### Cite As

Giuseppe Altieri (2024). my_ph_letters_v2 Updated version 2.00b (https://www.mathworks.com/matlabcentral/fileexchange/49725-my_ph_letters_v2-updated-version-2-00b), MATLAB Central File Exchange. Retrieved .

##### MATLAB Release Compatibility
Created with R2014b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux
##### Categories
Find more on ANOVA in Help Center and MATLAB Answers

### Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
2.0.0.0

version 2.00b
04-05-2016: corrected a bug into example script
- removed from the example script "h(i,i)=1;" => no more endless loop

1.0.0.0