From: Matt J on 21 Jun 2010 07:33 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hvnd1h$sq4$1(a)fred.mathworks.com>... > "Michalis " <micpan84(a)gmail.com> wrote in message <hvnavt$la8$1(a)fred.mathworks.com>... > > > There you can see only the zero'th and first order (or first and second if you prefer). I want to add an additional order. For the infinitive equation see below: > > http://en.wikipedia.org/wiki/Volterra_series > > Thanks, I learn new thing today, which is good. > > Back to the question: > > Here is two ways to carried out the sum: > > n = 5; > K=rand(n); > x=rand(1,n); > > % Engine 1 > y1 = zeros(2*n-1,n); > for j=1:n > y1(:,j) = convn(K(:,j),x(:),'full'); > end > y = zeros(2*n-1); > for i=1:2*n-1 > y(i,:) = convn(x(:).',y1(i,:),'full'); > end > y ================== So was the original equation written incorrectly? The original equation does not look like a repeated convolution, as implemented above. The above seems to generate a 2n+1 x 2n+1matrix, which then needs to be added to a 2n+1 vector. In any case, Engine 1 also looks like it doesn't require for loops. These loops will be done implicitly due to the 1-dimensionality of x(:), y1 = convn(K,x(:),'full'); y = convn(x(:).',y1,'full');
From: Bruno Luong on 21 Jun 2010 07:43 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hvnilg$l9i$1(a)fred.mathworks.com>... > So was the original equation written incorrectly? The original equation does not look like a repeated convolution, as implemented above. The above seems to generate a > 2n+1 x 2n+1matrix, which then needs to be added to a 2n+1 vector. Ah yeah right, the final vector is the diagonal term of the array. Bruno
From: Matt J on 21 Jun 2010 09:40 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hvnj8c$s8h$1(a)fred.mathworks.com>... > "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hvnilg$l9i$1(a)fred.mathworks.com>... > > > So was the original equation written incorrectly? The original equation does not look like a repeated convolution, as implemented above. The above seems to generate a > > 2n+1 x 2n+1matrix, which then needs to be added to a 2n+1 vector. > > Ah yeah right, the final vector is the diagonal term of the array. ================== Just so it's clear then, the solution I proposed was to avoid the brute force effort of doing a full 2D convolution when only the diagonal of the result was needed.
From: Bruno Luong on 21 Jun 2010 12:16 "Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <hvnq40$ctd$1(a)fred.mathworks.com>... > > Just so it's clear then, the solution I proposed was to avoid the brute force effort of doing a full 2D convolution when only the diagonal of the result was needed. Right, but the 2D convolution is reduced in two successive 1D convolutions (on 2D arrays). So it's no big deal, because the same complexity O(n^2*log(n)) is achieved, just the constant is increase by at most 2. Bruno
First
|
Prev
|
Pages: 1 2 3 Prev: creating den num for fix point filter Next: Help to calculate spectrogram ?? |