table = dlmread('Resultado.txt');

t = dlmread('teste_individuo.txt');
output = t(:,2);

erro1 = zeros(10320, 21);
for i = 1:21
erro1(:,i) = abs(table(:,i) - output);
end

erros = zeros(10320, 21);
for i = 1:10320
    for j = 1:21
        erros(i,j) = (erro1(i,j)/output(i,1))*100;
    end
end

statisticAnalysis = zeros(3, 21);
for i = 1:21
    e = erros(:, i);
    statisticAnalysis(1, i) = mean(e);
    statisticAnalysis(2, i) = std(e);
    statisticAnalysis(3, i) = max(e);
end

dlmwrite('Analise Estatística.txt', statisticAnalysis, 'delimiter', ' ');