Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. % Rishi Vadher
  2. % http://rishivadher.pt.vu
  3. function escreve_relatorio(missoes2)
  4. fid = fopen('relatorio.m', 'wt');
  5. % Escrever cabeçalho
  6. fprintf(fid,'%%%% Relatório de análise de missões\n%%\n');
  7. fprintf(fid,'%% Data: %s \n%% \n',date);
  8. fprintf(fid,'%% Hora: %s \n%% \n',datestr(now,13));
  9. fprintf(fid,'%% http://rishivadher.pt.vu \n');
  10. for i=1:length(missoes2)
  11.     % Escrever células e chamadas às funções de acordo com as análises pedidas
  12.     fprintf(fid, '\n\n%%%% Ficheiro: %s\n', missoes2(i).nome);
  13.     fprintf(fid, 'opcao_1(''%s'');', missoes2(i).nome);
  14. end
  15. result = fclose(fid);
  16. if result ~= 0
  17.     fprintf('erro')
  18. end
  19. % Publicar o documento em .html sem eco das instruções MATLAB
  20. publish ('relatorio.m', struct('showCode', false));
  21. end