The ANOVA1 and ANOVA2 functions perform fixed-effects analysis of variance (anova). ANOVA1 does one-way anova. ANOVA2 does two-way anova with perfectly balanced data; that is, each combination of the two factors must have the same number of measurements.
The ANOVAN function is more flexible. It can perform one-, two-, or higher-way anova that is not balanced. Also, you can specify factors as random effects. The ANOVAN function will then compute expected mean squares and use them to perform the appropriate F tests. It will also compute estimates of the variances of the random effect terms (sometimes called the components of variance) by equating the calculated mean squares to their expected values, and solving for the variances.
The capability to fit repeated measures models has been introduce in release R2014a.