--- /home/sh/Programmer//share/octave/2.9.7/m/strings/bin2dec.m 2006-08-05 11:22:50.000000000 +0200 +++ bin2dec.m 2006-08-08 22:03:15.000000000 +0200 @@ -37,10 +37,16 @@ function d = bin2dec (h) - if (nargin != 1) - usage ("bin2dec (b)"); + if (nargin != 1 || !ischar(h)) + printr_usage(); else - d = base2dec (h, 2); + n = size(h,1); + d = zeros(n,1); + for i = 1:n + s = h(i,:); + s = s(!isspace(s)); + d(i) = base2dec (s, 2); + endfor endif endfunction