# HG changeset patch # User Rik # Date 1330193655 28800 # Node ID e3dbcb75f55791a99336356f7e7eb11b401c681f # Parent 98cf8aa9f8ba3a6cfe0660e517a4e5fe84d91c37# Parent 73f02881260f335a4904f8f9b864e7602a4f83c5 maint: periodic merge of stable to default. diff -r 98cf8aa9f8ba -r e3dbcb75f557 NEWS --- a/NEWS Fri Feb 24 18:16:35 2012 -0800 +++ b/NEWS Sat Feb 25 10:14:15 2012 -0800 @@ -46,7 +46,7 @@ http://forge.scilab.org/index.php/p/arpack-ng ** Many of Octave's binary operators (.*, .^, +, -, ...) now perform - automatic broadcasting for array operations that allows you to use + automatic broadcasting for array operations which allows you to use operator notation instead of calling bsxfun or expanding arrays (and unnecessarily wasting memory) with repmat or similar idioms. For example, to scale the columns of a matrix by the elements of a row @@ -108,7 +108,7 @@ negative binomial function has been extended to real, non-integer inputs. The discrete_inv fucntion now returns v(1) for 0 instead of - NaN. The nbincdf fucntion has bbeen recoded to use a closed form + NaN. The nbincdf fucntion has been recoded to use a closed form solution with betainc. ** strread, textscan, and textread have been completely revamped. diff -r 98cf8aa9f8ba -r e3dbcb75f557 scripts/strings/base2dec.m --- a/scripts/strings/base2dec.m Fri Feb 24 18:16:35 2012 -0800 +++ b/scripts/strings/base2dec.m Sat Feb 25 10:14:15 2012 -0800 @@ -89,7 +89,7 @@ table = NaN (1, 256); table(toascii (symbols(1:base))) = 0 : base-1; table(toascii (" ")) = 0; - s = table(toascii (s)); + s = reshape (table(toascii (s)), size (s)); ## Multiply the resulting digits by the appropriate power ## and sum the rows. @@ -103,6 +103,9 @@ %!assert (base2dec ("-1", 2), NaN) %!assert (base2dec ({"A1", "1A"}, 16), [161; 26]) +%% Bug #35621 +%!assert (base2dec (["0"; "1"], 2), [0; 1]) + %%Test input validation %!error base2dec () %!error base2dec ("11120")