compteurminute.m 240 B

1234567891011121314151617
  1. function [x] = compteurminute(n)
  2. i=1;
  3. %max=60;
  4. if nargin < 1
  5. n=2;
  6. end
  7. fid = fopen('compteur_matlab.out','w');
  8. while i < n*60
  9. fprintf(fid,'%2d secondes\n',i);
  10. %fprintf(" i = %d \n",i);
  11. i = i + 1;
  12. pause(1);
  13. end
  14. fclose(fid);
  15. end