Prev: How to surface plots over 3d models in MATLAB?
Next: Neural network train problem with validation
From: Andy Hennig on 7 May 2010 04:18 Hello, I would like to calculate an autocorrelation for a quite long input-vector, at least longer than the magical 2^20 for which "xcorr" can be used. In the documentary it says: "If you need to process longer sequences, see dfilt.fftfir." As this is not my field of expertise I looked for examples to use on the internet but couldn't find none. Does anyone have any experience on how to calculate an autocorrelation on vectors longer than 2^20 numbers? I'd appreciate any feedback on this, eisvogel xcorr: http://www.mathworks.com/access/helpdesk/help/toolbox/signal/xcorr.html dfilt.fftfir: http://www.mathworks.com/access/helpdesk/help/toolbox/signal/dfilt.fftfir.html
From: Bruno Luong on 7 May 2010 08:39 Andy Hennig <phoenixasche(a)gmx.net> wrote in message <572026583.88016.1273234762059.JavaMail.root(a)gallium.mathforum.org>... > Hello, > > > I would like to calculate an autocorrelation for a quite long input-vector, at least longer than the magical 2^20 for which "xcorr" can be used. > > In the documentary it says: "If you need to process longer sequences, see dfilt.fftfir." As this is not my field of expertise I looked for examples to use on the internet but couldn't find none. > > Does anyone have any experience on how to calculate an autocorrelation on vectors longer than 2^20 numbers? Well, I'l mot sure if the document is up-to-date. I try >> x=rand(2^22,1); y=rand(size(x)); >> c=xcorr(x,y); >> size(c) % 2^23-1 elements ans = 8388607 1 It works just fine. Bruno
From: Mark Shore on 7 May 2010 09:44 "Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <hs11l8$5je$1(a)fred.mathworks.com>... > Andy Hennig <phoenixasche(a)gmx.net> wrote in message <572026583.88016.1273234762059.JavaMail.root(a)gallium.mathforum.org>... > > Hello, > > > > > > I would like to calculate an autocorrelation for a quite long input-vector, at least longer than the magical 2^20 for which "xcorr" can be used. > > > > In the documentary it says: "If you need to process longer sequences, see dfilt.fftfir." As this is not my field of expertise I looked for examples to use on the internet but couldn't find none. > > > > Does anyone have any experience on how to calculate an autocorrelation on vectors longer than 2^20 numbers? > > Well, I'l mot sure if the document is up-to-date. I try > > >> x=rand(2^22,1); y=rand(size(x)); > >> c=xcorr(x,y); > >> size(c) % 2^23-1 elements > > ans = > > 8388607 1 > > It works just fine. > > Bruno I was able to do the same with x=rand(2^25,1) using 2010a x64, although my computer hung with 2^26. Guess the documentation *is* out of date.
From: EE Student on 7 May 2010 12:40 Andy Hennig <phoenixasche(a)gmx.net> wrote in message <572026583.88016.1273234762059.JavaMail.root(a)gallium.mathforum.org>... > Hello, > > > I would like to calculate an autocorrelation for a quite long input-vector, at least longer than the magical 2^20 for which "xcorr" can be used. > > In the documentary it says: "If you need to process longer sequences, see dfilt.fftfir." As this is not my field of expertise I looked for examples to use on the internet but couldn't find none. > > Does anyone have any experience on how to calculate an autocorrelation on vectors longer than 2^20 numbers? > > I'd appreciate any feedback on this, > eisvogel > > xcorr: http://www.mathworks.com/access/helpdesk/help/toolbox/signal/xcorr.html > dfilt.fftfir: http://www.mathworks.com/access/helpdesk/help/toolbox/signal/dfilt.fftfir.html Assuming x1 is input 1 and has length L1, x2 is input 2 and has length L2 are you speciffically looking for an output with with length L1+L2 - 1? If not you may be able to calulate a circular auto correlation such that cc = fftshift(real(ifft(fft(x1).*conj(fft(x1))))). I dont know if this will allow you to calculate vectors longer than2^25 but its worth a shot
From: Andy Hennig on 8 May 2010 04:29 Dear Nicholas, you are right, I only need one side of the autocorrelation. Unfortunately, I am not familiar with the term "circular autocorrelation" nor with what your code does exactly, however I have tried what you suggested in comparison to "xcorr(x,y)" but it doesn't seem to be calculating an autocorrelation as I am used from "xcorr". I have uploaded a comparison: http://img265.imageshack.us/i/xcorrrlength1.png/ Or maybe I have applied your hint the wrong way? Andy P.S. Why is my email shown, even though in my settings I got it set to 'hidden'?
|
Next
|
Last
Pages: 1 2 Prev: How to surface plots over 3d models in MATLAB? Next: Neural network train problem with validation |