在MATLAB中有一个函数mscohere
我需要用Python实现它。
MATLAB代码如下:
[Cxy,~] = mscohere(LS,RS);
LS,RS - 数组类型为float。
计算连贯性的模块吗?或者任何人都可以用Python预期它?
答案 0 :(得分:2)
是的,它在scipy模块中有一个:
scipy.signal.coherence(x, y, fs=1.0, window='hann', nperseg=256, noverlap=None, nfft=None, detrend='constant', axis=-1)
可以找到包含示例的详细文档here