% Rishi Vadher
% http://rishivadher.pt.vu
function escreve_relatorio(missoes2)
fid = fopen('relatorio.m', 'wt');
% Escrever cabeçalho
fprintf(fid,'%%%% Relatório de análise de missões\n%%\n');
fprintf(fid,'%% Data: %s \n%% \n',date);
fprintf(fid,'%% Hora: %s \n%% \n',datestr(now,13));
fprintf(fid,'%% http://rishivadher.pt.vu \n');
for i=1:length(missoes2)
% Escrever células e chamadas às funções de acordo com as análises pedidas
fprintf(fid, '\n\n%%%% Ficheiro: %s\n', missoes2(i).nome);
fprintf(fid, 'opcao_1(''%s'');', missoes2(i).nome);
end
result = fclose(fid);
if result ~= 0
fprintf('erro')
end
% Publicar o documento em .html sem eco das instruções MATLAB
publish ('relatorio.m', struct('showCode', false));
end