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.
|
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-
|
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-
|
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.
|