comparison scripts/general/postpad.m @ 7208:a730e47fda4d

[project @ 2007-11-28 02:32:41 by jwe]
author jwe
date Wed, 28 Nov 2007 02:32:42 +0000
parents a1dbe9d80eee
children 3292bd1bbaa4
comparison
equal deleted inserted replaced
7207:71c03c7239fb 7208:a730e47fda4d
68 d = sz (dim); 68 d = sz (dim);
69 69
70 if (d >= l) 70 if (d >= l)
71 idx = cell (); 71 idx = cell ();
72 for i = 1:nd 72 for i = 1:nd
73 idx {i} = 1:sz(i); 73 idx{i} = 1:sz(i);
74 endfor 74 endfor
75 idx {dim} = 1:l; 75 idx{dim} = 1:l;
76 y = x (idx {:}); 76 y = x(idx{:});
77 else 77 else
78 sz (dim) = l - d; 78 sz (dim) = l - d;
79 y = cat (dim, x, c * ones (sz)); 79 y = cat (dim, x, c * ones (sz));
80 endif 80 endif
81 81