signal.fftconvolve equivalent in Matlab

11 Ansichten (letzte 30 Tage)
Avik Mahata
Avik Mahata am 26 Jun. 2021
Beantwortet: Swetha Polemoni am 29 Jun. 2021
I hav a matrix of dipole moment and I need to get the autocorrelation funcion. In Python it does with these two lines of code. I am wondering what will be the Matlab equivalent for this two lines,
autocorr_x_full = (signal.fftconvolve(dipole_x_shifted,dipole_x[::-1], mode='same')[(-len(time)):] / np.arange(len(time), 0, -1))
autocorr = autocorr_full[:int(len(time) * fraction_autocorrelation_function_to_fft)]

Antworten (1)

Swetha Polemoni
Swetha Polemoni am 29 Jun. 2021
Hi Avik Mahata
It is my understanding that you want to do convolution and autocorrelation in matlab. You can use Matlab functions 'conv' and'autocorr' for convolution and autocorrelation.

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by