相当于MATLAB函数"ischange"的Python [英] Python equivalent to the MATLAB function "ischange"

查看:459
本文介绍了相当于MATLAB函数"ischange"的Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道Python函数是否等同于MATLAB函数 ischange .

Does anyone know if a Python function equivalent to the MATLAB function ischange.

我只是想在以下数据中提取曲线的平坦部分.

I'm simply trying to extract the flat part of the curve in the following data.

我尝试了numpy.diff,它给出了嘈杂的结果.

I've tried numpy.diff which gives noisy results.

推荐答案

您可以使用numpy.diff并在末尾添加.round()来消除噪音,因为我看到您的噪音恰好小于0.5.

You can use numpy.diff with .round() added at the end, to get rid of noise, as I see your noise happens to be less than 0.5.

这篇关于相当于MATLAB函数"ischange"的Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆