If you have the Statistics and Machine Learning Toolbox, you can use the anovan function. In particular it looks like this example (from that same documentation page) is close to what you want to do.
I don't really have experience with ANOVA myself, so I can't provide more specific suggestions than that.