Mercurial > hg > octave-terminal
changeset 12637:d02798e9eeae stable
filter.cc: Stop test errors in residue.m (bug #33164)
* filter.cc: Reshape b,a inputs to column vectors
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Tue, 26 Apr 2011 11:27:28 -0700 |
parents | accd03f66982 |
children | 4d777e05d47c |
files | src/DLD-FUNCTIONS/filter.cc |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/filter.cc +++ b/src/DLD-FUNCTIONS/filter.cc @@ -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<T>(0.0))