General framework for organizing data for N-way repeated measures analyses in Matlab (and partly Python), including an implementation of repeated measures ANOVA