MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 如何找到曲线中的有效极点(曲线有很多小锯齿) (https://www.labfans.com/bbs/showthread.php?t=10681)

rose007 2010-01-28 15:19

如何找到曲线中的有效极点(曲线有很多小锯齿)
 
各位大哥:
如何求取曲线中的所有极点,这曲线是我用采集盒采集到的点,因此曲线上会有很多小锯齿,我试过用平滑处理后,medfilt1函数先处理再找极点,可效果不是很好,代码如下

y = medfilt1(x2,9);
x=y;
id = find( sign(x(2:end-1)-x(1:end-2))~=sign (x(3:end)-x(2:end-1)))+1;
plot(1:1024,x,'b-',id,x(id),'g*');

请各位帮忙看看,有没有更好的办法平滑曲线,并且找到有效极点


所有时间均为北京时间。现在的时间是 12:47

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.