comparison scripts/general/int2str.m @ 7540:3422f39573b1

strcat.m: Matlab compatibility, with cstrcat.m replacing conventional strcat.m.
author Ben Abbott <bpabbott@mac.com>
date Thu, 28 Feb 2008 02:41:19 -0500
parents 83a8781b529d
children 502e58a0d44f
comparison
equal deleted inserted replaced
7539:3e107d73aeb4 7540:3422f39573b1
41 endfor 41 endfor
42 idx(2) = 1; 42 idx(2) = 1;
43 ifmt = get_fmt (x(idx{:}), 0); 43 ifmt = get_fmt (x(idx{:}), 0);
44 idx(2) = 2:sz(2); 44 idx(2) = 2:sz(2);
45 rfmt = get_fmt (x(idx{:}), 2); 45 rfmt = get_fmt (x(idx{:}), 2);
46 fmt = strcat (ifmt, repmat (rfmt, 1, nc-1), "\n") 46 fmt = cstrcat (ifmt, repmat (rfmt, 1, nc-1), "\n")
47 else 47 else
48 fmt = strcat (get_fmt (x, 0), "\n"); 48 fmt = cstrcat (get_fmt (x, 0), "\n");
49 endif 49 endif
50 tmp = sprintf (fmt, permute (x, [2, 1, 3 : nd])); 50 tmp = sprintf (fmt, permute (x, [2, 1, 3 : nd]));
51 tmp(end) = ""; 51 tmp(end) = "";
52 retval = split (tmp, "\n"); 52 retval = split (tmp, "\n");
53 else 53 else