bugGNU Octave - Bugs: bug #32741, filter initial conditions do not...

 
 

bug #32741: filter initial conditions do not work for matrix input

Submitted by:  None
Submitted on:  Thu 10 Mar 2011 07:09:51 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Valentin AbramzonOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.2.4
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 04 Jun 2011 02:16:46 PM UTC, comment #5:

I've checked in yet a third fix (http://hg.savannah.gnu.org/hgweb/octave/rev/9843b3b055e0). This time I just rewrote the entire input checking routine for the SI vector rather than try to amend the existing code. It works for the two failing test cases in this bug report, but please test more.

Rik <rik5>
Project Administrator
Thu 02 Jun 2011 07:41:14 PM UTC, comment #4:

But in the current dev version (rev. 12637) one still gets

octave> filter( [ 1, 1, 1 ], [ 1, 1 ], [ 1 2], [ 1, 1] )
error: filter: first dimension of SI must be of length max (length (a), length (b)) - 1

whereas in 3.4 and in matlab it is correctly:

octave> filter( [ 1, 1, 1 ], [ 1, 1 ], [ 1 2], [ 1, 1] )
ans =

2 2

So it seems the bug is still there.

Muhali <muhali>
Sat 02 Apr 2011 02:00:23 AM UTC, comment #3:

Fixed in this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/3b0eb443c519). You will need to build from Mercurial sources or wait for the bug fix release 3.4.1 in order to see the fix.

Rik <rik5>
Project Administrator
Fri 01 Apr 2011 10:19:52 PM UTC, comment #2:

matlab says:
+verbose+

>> filter( [ 1, 3 ], [ 1 ], [ 1 2; 3 4; 5 6 ], [ 4, 5 ] )


ans =

5 7
6 10
14 18

>> version


ans =

7.9.0.529 (R2009b)
-verbose-

Michael Godfrey <godfrey>
Project Member
Fri 01 Apr 2011 10:08:30 PM UTC, comment #1:

I think I have a fix for this. However, I'm still not sure filter is correctly handling the initial conditions. Could you report what the following command does in Matlab?

+verbose+
filter( [ 1, 3 ], [ 1 ], [ 1 2; 3 4; 5 6 ], [ 4, 5 ] )
-verbose-

Rik <rik5>
Project Administrator
Thu 10 Mar 2011 07:09:51 PM UTC, original submission:

When I try to use the filter function to perform IIR filtering on each column of a matrix, specifying initial conditions produces and error:

filter( [ 1, 1 ], [ 1 ], [ 1 2; 3 4; 5 6 ], [ 1, 1 ] )
error: filter: first dimension of si must be of length max (length (a), length (b)) - 1

Since a = [ 1 ] and b = [ 1, 1 ],
max(length (a), length (b)) - 1 = 1.

The first dimension of my initial condition si = [ 1, 1 ] is 1, so it seems that this should work, not give me an error.

I also checked the same statement in Matlab, and it produces the expected results:

>> filter( [ 1, 1 ], [ 1 ], [ 1 2; 3 4; 5 6 ], [ 1, 1 ] )


ans =

2 3
4 6
8 10

As far as I could tell, the was not fixed in Octave 3.4.0.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 Apr 2011 02:00:23 AM UTCrik5StatusNeed Info=>Fixed
      Open/ClosedOpen=>Closed
    Fri 01 Apr 2011 10:08:30 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1