reverse-shooting

Matlab scripts for reverse shooting
Log | Files | Refs | README

addcommas.m (223B)


      1 function s=addcommas(x);
      2 
      3 % returns a string containing the number x with commas (zero decimal)
      4 
      5 s=int2str(x);
      6 N=length(s);
      7 if N>3;
      8   for i=1:ceil(N/3-1);
      9     jj=N-3*i+1;
     10     s=[s(1:(jj-1)) ',' s(jj:length(s))];
     11   end;
     12 end;