[SciPy-User] calculate xcorr/acorr without plotting?
josef.pktd at gmail.com
josef.pktd at gmail.com
Wed Jun 23 18:42:29 EDT 2010
On Wed, Jun 23, 2010 at 4:57 PM, David Ho <itsdho at ucla.edu> wrote:
> Hi all!
>
> Is there a way to calculate a cross-correlation (xcorr) or autocorrelation
> (acorr) without actually plotting a figure?
>
> For example, for histograms, I can use matplotlib.pyplot.hist() to plot a
> histogram, but I can also use numpy.histogram() if I just want to compute
> the values without plotting a figure.
> I'd like to do something similar for cross-correlations.
not directly, but it's just a few lines, that can be copied from the
source of matplotlib or statsmodels or several other packages
eg.
acov = numpy.correlate(x,x)/len(x)
see the thread "Autocorrelation function: Convolution vs FFT" from
the last two days.
same works with xcorr
Josef
>
> Thanks for your help!
>
> --David Ho
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>
More information about the SciPy-User
mailing list