From: Carnë D. <car...@gm...> - 2012-11-16 18:29:25
|
On 12 November 2012 21:21, Jordi Gutiérrez Hermoso <jo...@oc...> wrote: > OF list: fftconv2's vector-vector-matrix three-arg call seems > incorrect and seems to have been incorrect for some time. Can anyone > please confirm? These two calls should both be equal: > > octave:1> conv2(1:3, 1:2, [1 2; 3 4; 5 6]) > ans = > > 1 4 4 > 5 18 16 > 14 48 40 > 19 62 48 > 15 48 36 > > octave:2> fftconv2(1:3, 1:2, [1 2; 3 4; 5 6]) > ans = > > 1 4 7 6 > 5 18 31 24 > 11 36 61 42 > 10 32 54 36 > > > The upper result is correct. You can nobtain this result with > fftconv2(fftconv2([1 2; 3 4; 5 6,1:2),1:3), so I think this should be > fairly easy to fix. You can't. Your alternative gives a syntax error, I believe you meant what I tried below which still does not give the same result. See: octave> conv2(1:3, 1:2, [1 2; 3 4; 5 6]) ans = 1 4 4 5 18 16 14 48 40 19 62 48 15 48 36 octave> fftconv2(fftconv2([1 2; 3 4; 5 6], 1:2), 1:3) ans = 1 6 15 20 12 3 16 37 46 24 5 26 59 72 36 Carnë |