You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: I_ANOVATest.m
    path of file: ./repos/FMUT/testing
    
    the code of the file until where you have to start completion: %Test FMUT ANOVA calculations against MATLAB ANOVA calculations
%
%Author: Eric Fields
%Version Date: 12 June 2020

%Simulation parameters
n_electrodes = 32;
n_time_pts = 40;
n_subs = 16;

%% RB & SP DESIGNS PARAMETRIC ANOVA

%Designs to test
anova_designs = {2, ...
                 5, ...
                 [2, 2], ...
                 [4, 2], ...
                 [2, 5], ...
                 [3, 4], ...
                 [2, 2, 2], ...
                 [3, 2, 2], ...
                 [2, 3, 2], ...
                 [2, 2, 3], ...
                 [3, 3, 2], ...
                 [2, 3, 3], ...
                 [4, 2, 5], ...
       
    
function

function [rm, ranovatbl] = matlab_ANOVA(rm_data, wg_design, cond_subs, var_names)
%Calculate ANOVA with MATLAB's stats module
%
%INPUTS
% rm_data   - subjects x variables array
% wg_design - number of levels of each factor from slowest to fastest
%             moving in rm_data columns
%
%OUTPUTS
% rm        - RepeatedMeasuresModel object
% ranovatbl - Results of repeated measures anova, returned as a table
    
    n_subs = size(rm_data, 1);
    
    %Within subject design table
    withindesign = cell2table(cell(prod(wg_design), length(wg_design)), 'VariableNames', var_names);
    row = 0;
    if length(wg_design) ==1
        for a = 1:wg_design(1)
            row = row + 1;
            withindesign{row, 'A'} = {sprintf('A%d', a)};
        end