function [output1, output2] = myStats(data)

    output1 = myMean(data);
    output2 = myMedian(data);
    
end

function output = myMean(data)

    output = sum(data) / length(data);

end

function output = myMedian(data)

    sorted = sort(data);

    N = length(data);
    idx = floor(N / 2);
    if mod(N, 2) == 1
        output = (sorted(idx) + sorted(idx + 1)) / 2;
    else
        output = sorted(idx);
    end

end