2016-08-03 14 views
1

In MATLAB haben Sie eine Funktion mscohere ich muss es in Python implementiert werden. der MATLAB-Code ist wie folgt:Gibt es in Python ein Analog einer MATLAB-Funktion `mscohere`?

[Cxy,~] = mscohere(LS,RS); 

LS, RS - Arrays Typ float.

Module zur Berechnung der Kohärenz verwenden? Oder kann es jemand in Python erwartet haben?

Documentation mscohere in MATLAB

+1

gefunden werden kann Vielleicht [diese] (http://stackoverflow.com/ Fragen/31829604/why-is-cohere-Funktion-in-Matplotlib-Python-geben-Antwort-anders-von-mscoher) könnte ein guter Ausgangspunkt sein. – Abdou

Antwort

2

Ja, es hat eine im scipy Modul:

scipy.signal.coherence(x, y, fs=1.0, window='hann', nperseg=256, noverlap=None, nfft=None, detrend='constant', axis=-1) 

Eine ausführliche Dokumentation mit Beispielen here

+0

aber ich benutze 'matplotlib.mlab.cohere (x, y, NFFT = 256, Fs = 1)' http://matplotlib.org/api/mlab_api.html#matplotlib.mlab.cohere – EmptyMan

+0

obwohl die Antwort ist auch eine Arbeitsversion, die ich dann zurückgegeben habe :) – EmptyMan

Verwandte Themen