在Python中是否有MATLAB函数`mscohere`的类比?

时间:2016-08-03 15:16:01

标签: python matlab

在MATLAB中有一个函数mscohere我需要用Python实现它。 MATLAB代码如下:

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

LS,RS - 数组类型为float。

计算连贯性的模块吗?或者任何人都可以用Python预期它?

Documentation mscohere in MATLAB

1 个答案:

答案 0 :(得分:2)

是的,它在scipy模块中有一个:

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

可以找到包含示例的详细文档here