Load the sample data.

load fisheriris

The column vector, `species` consists of iris
flowers of three different species: setosa, versicolor, virginica.
The double matrix `meas` consists of four types of
measurements on the flowers: the length and width of sepals and petals
in centimeters, respectively.

Store the data in a table array.

t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),...
'VariableNames',{'species','meas1','meas2','meas3','meas4'});
Meas = dataset([1 2 3 4]','VarNames',{'Measurements'});

Fit a repeated measures model, where the measurements
are the responses and the species is the predictor variable.

rm = fitrm(t,'meas1-meas4~species','WithinDesign',Meas);

Perform repeated measures analysis of variance.

ranovatbl = ranova(rm)

ranovatbl =
SumSq DF MeanSq F pValue pValueGG pValueHF pValueLB
______ ___ ________ ______ ___________ ________ ________ ________
Measurements 1656.3 3 552.09 6873.3 0 0 0 0
species:Measurements 282.47 6 47.078 586.1 1.4271e-206 0 0 0
Error 35.423 441 0.080324

`ranova` computes the last three *p*-values
using Greenhouse-Geisser, Huynh-Feldt, and lower bound corrections,
respectively.

Display the epsilon correction values.

epsilon(rm)

ans =
epsilon
_______
Uncorrected 1
Greenhouse-Geisser 0.75179
Huynh-Feldt 0.77448
Lower bound 0.33333

You can check the compound symmetry (sphericity) assumption
using the `mauchly` method.