# HG changeset patch # User Rik # Date 1303842448 25200 # Node ID d02798e9eeaec12825fd5b386756ea9195d69102 # Parent accd03f6698256dd21d0d374dcd6097ee32ac7a6 filter.cc: Stop test errors in residue.m (bug #33164) * filter.cc: Reshape b,a inputs to column vectors diff -r accd03f66982 -r d02798e9eeae src/DLD-FUNCTIONS/filter.cc --- a/src/DLD-FUNCTIONS/filter.cc Mon Apr 25 22:17:43 2011 -0700 +++ b/src/DLD-FUNCTIONS/filter.cc Tue Apr 26 11:27:28 2011 -0700 @@ -64,6 +64,14 @@ octave_idx_type ab_len = a_len > b_len ? a_len : b_len; + // FIXME: The two lines below should be unecessary because + // this template is called with a and b as column vectors + // already. However the a.resize line is currently (2011/04/26) + // necessary to stop bug #33164. + b.resize (dim_vector (ab_len, 1), 0.0); + if (a_len > 1) + a.resize (dim_vector (ab_len, 1), 0.0); + T norm = a (0); if (norm == static_cast(0.0))