![](/img/trans.png)
[英]Is there any function in Python similar to 'which' and 'open' in matlab?
[英]Is there any function/implementation in python similar to peaks(N) in MATLAB?
您可以使用 SciPy
from scipy.signal import find_peaks
peaks, _ = find_peaks(x, height=0) # x is the signal
print("x-values: ", peaks," y-values: ", x[peaks])
.. 或者一個快速的解決方案,如果你的信號不是太嘈雜,那么你可以手動平滑信號,區分平滑的信號,找到一個閾值並計算零:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.