function [output1, output2] = myStat(data)

    output1 = mean(data);
    output2 = median(data);

end

function result = mean(data)

    N = length(data);
    result = sum(data) / N;

end

function result = median(data)

    N = length(data);
    sorted_data = sort(data);
    middle = round(N / 2);
    if mod(N, 2) == 1
        result = sorted_data(middle + 1);
    else
        result = sum(sorted_data(middle : middle + 1)) / 2;
    end
    
end