Parent Directory
|
Revision Log
|
Revision Graph
First complete check in with v4_llc270 ecco-darwin set-up
1 | function s=myint2str(x,n); |
2 | %MYIN2STR(X,N) convert integer to string with leading zeros |
3 | % padds integer X with zeros to N locations |
4 | |
5 | if nargin < 2, n=2; end |
6 | if nargin < 1, help myint2str, return, end |
7 | |
8 | %s=int2str(x); |
9 | %n=n-length(s); |
10 | %for i=1:n |
11 | % s=['0' s]; |
12 | %end |
13 | |
14 | % replacement code contributed by M. Losch, November 28, 2008 |
15 | fmt = sprintf('%%0%iu',n); |
16 | s=sprintf(fmt,x); |
ViewVC Help | |
Powered by ViewVC 1.1.22 |