Back to home page

MITgcm

 
 

    


Warning, /utils/matlab/cs_grid/read_cs/myint2str.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit a71b5ece on 2012-11-15 16:58:38 UTC
a71b5ece1c Dimi*0001 function s=myint2str(x,n);
                0002 %MYIN2STR(X,N)   convert integer to string with leading zeros
                0003 %                padds integer X with zeros to N locations
                0004 
                0005 if nargin < 2, n=2;  end
                0006 if nargin < 1, help myint2str, return, end
                0007 
                0008 s=int2str(x);
                0009 n=n-length(s);
                0010 for i=1:n
                0011   s=['0' s];
                0012 end